redoc
redoc copied to clipboard
readOnly property is not marked in HTML
Properties marked as readOnly
are not visually marked as readOnly in HTML see:
example
packets:
type: integer
minimum: 0
readOnly: true
(also they are not present at all in the request, already reported here https://github.com/Redocly/redoc/issues/948)
tested on 2.0.rc14
Issue #948 is already answered.
As stated in open api spec:
readOnly properties are included in responses but not in requests, and writeOnly properties may be sent in requests but not in responses.
As far as I can see Redoc is following that perfectly.
As far as I can see Redoc is following that perfectly.
may be not, schema is not the request-payload, so it should be shown and marked as readonly in the schema. However the generated request-sample should not include the readonly field, as it represent the request-payload
issue #948 is not yet closed. and it is correctly pointing out that Redoc is at odds with other viewers such as swagger-ui and rapi-doc
and this issue is about something else - I'm not saying that readonly property is not displayed in the request (that's #948), I'm saying that in the response, where the readonly property is shown - it is not visually marked as readonly, you can't tell from the generated doc, see the screenshot.
For comparison see the swagger ui
Related: #991
I have the same issue that in the response: the readonly property is shown - it is not visually marked as readonly, you can't tell from the generated doc