Skip to content
New issue

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

additionalProperties not rendered #596

Closed
m-mohr opened this issue Aug 6, 2018 · 1 comment
Closed

additionalProperties not rendered #596

m-mohr opened this issue Aug 6, 2018 · 1 comment

Comments

@m-mohr
Copy link
Contributor

m-mohr commented Aug 6, 2018

In schemata for objects it is allowed to set additionalProperties to true and allow arbitrary key-value pairs. Unfortunately this is not rendered by ReDoc and users reading the rendered documentation are not aware of the fact that they can add more properties than the one specified directly in the OpenAPI specification.

Example:

openapi: 3.0.1
info:
  title: Test
  version: "0.1.0"
paths:
  /example:
    get:
      summary: Example operation
      description: This is a simple example.
      responses:
        '200':
          description: This is a sample schema for a response with additionalProperties.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: number
                  stringProperties:
                    type: object
                    additionalProperties:
                      type: string
                  untypedProperties:
                    type: object
                    additionalProperties: true
              example:
                id: 123
                stringProperties:
                  anotherProp: "test"
                untypedProperties:
                  anotherProp: "test"

Rendered as: https://rebilly.github.io/ReDoc/?url=http://mamo-net.de/feature/redoc/additionalprops.yaml

I would expect that additional properties of any type are allowed for the untypedProperties object. Should be the same way as for the stringProperties.

@m-mohr m-mohr changed the title additionalProperties not rendered "additionalProperties: true" not rendered Aug 6, 2018
@m-mohr m-mohr changed the title "additionalProperties: true" not rendered additionalProperties not rendered Aug 6, 2018
@m-mohr
Copy link
Contributor Author

m-mohr commented Aug 7, 2018

@RomanGotsiy Created a PR (#597) to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant