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

patternProperties are not shown for nested objects with no other properties defined #2071

Closed
arvidfm opened this issue Jul 5, 2022 · 0 comments · Fixed by #2073
Closed
Assignees

Comments

@arvidfm
Copy link

arvidfm commented Jul 5, 2022

Describe the bug
If you have a nested object with patternProperties defined, but no properties, the patternProperties definition is not shown.

Expected behavior
The patternProperties should show regardless of whether other properties have been defined on the same object.

Minimal reproducible OpenAPI snippet(if possible)
If you uncomment the definition of the hello property in the following, both hello and the patternProperties definition show as expected:

openapi: 3.1.0
info:
  version: 1.0.0
  title: Example.com
servers:
  - url: 'https://{tenant}/api/v1'
paths:
  '/users/{username}':
    get:
      summary: Get user by user name
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                properties:
                  test:
                    type: object
                    #properties:
                    #  hello:
                    #    type: integer
                    patternProperties:
                      .*:
                        type: integer

Screenshots
patternProperties not shown:
image

Additional context
Add any other context about the problem here.

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

Successfully merging a pull request may close this issue.

2 participants