We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello everyone,
As it seems, the bug #142 has reappeared. As there did not seem to be an option to reopen the ticket, I am creating a new one.
I used the following code snippet as an example for the behaviour:
openapi: 3.0.3 info: title: "API for testing read-only values" version: "0.1.0" tags: - name: "Testendpoint" paths: /tables: post: description: "Create a table" requestBody: content: application/json: schema: $ref: "#/components/schemas/TestTable" responses: 200: description: "OK" content: application/json: schema: $ref: "#/components/schemas/TestTable" components: schemas: TestTable: type: object properties: id: type: "string" format: uuid readOnly: true inserted_at: type: string format: date-time description: "Date and Time at which the object was created" readOnly: true name: type: string description: "human-readable name" example: id: "7160f045-e24e-414e-891d-10fb5c9b8c5d" inserted_at: "2021-03-11T09:44:03Z" name: "Table1"
To create the documentation I used redoc-cli version 0.10.2. NPM state the redoc version as 2.0.0-rc.48.
redoc-cli
0.10.2
2.0.0-rc.48
The text was updated successfully, but these errors were encountered:
You have a literal example in your schema which redoc uses directly without any modifications.
It probably should remove fields from it. As a temporal workaround you can use the following schema:
openapi: 3.0.3 info: title: "API for testing read-only values" version: "0.1.0" tags: - name: "Testendpoint" paths: /tables: post: description: "Create a table" requestBody: content: application/json: schema: $ref: "#/components/schemas/TestTable" responses: 200: description: "OK" content: application/json: schema: $ref: "#/components/schemas/TestTable" components: schemas: TestTable: type: object properties: id: type: "string" format: uuid readOnly: true example: "7160f045-e24e-414e-891d-10fb5c9b8c5d" inserted_at: type: string format: date-time description: "Date and Time at which the object was created" readOnly: true example: "2021-03-11T09:44:03Z" name: type: string description: "human-readable name" example: "Table1"
Sorry, something went wrong.
Thank you, I did not occur to me, that the examples are taken literally without filtering. Changing my schemas helped with this.
No branches or pull requests
Hello everyone,
As it seems, the bug #142 has reappeared.
As there did not seem to be an option to reopen the ticket, I am creating a new one.
I used the following code snippet as an example for the behaviour:
To create the documentation I used
redoc-cli
version0.10.2
.NPM state the redoc version as
2.0.0-rc.48
.The text was updated successfully, but these errors were encountered: