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

All openapy fields marked as required even when they are not #6

Open
developer-betandeal opened this issue Apr 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@developer-betandeal
Copy link

Describe the bug

After generating the pages for openapi.yaml that doesn't mark as required the fileds for some object, all the attributes are marked as "required"

Expected behavior

Not mark as Required all non required attributes for schema

Current behavior

All the attributes are marked as required

Steps to reproduce

openapi.yaml:

      properties:
        error:
          type: string
        status:
          type: string
          enum:
            - ok
            - ko
      required:
        - status
      additionalProperties: false

Generated html:

<ul style="margin-left: 1rem;"><div class="openapi-schema__list-item"><div><span class="openapi-schema__container"><strong class="openapi-schema__property">error</strong><span class="openapi-schema__name"> string</span><span class="openapi-schema__required">required</span></span></div></div><div class="openapi-schema__list-item"><div><span class="openapi-schema__container"><strong class="openapi-schema__property">status</strong><span class="openapi-schema__name"> string</span><span class="openapi-schema__divider"></span><span class="openapi-schema__required">required</span></span><div><p><strong>Possible values:</strong> [<code>ok</code>, <code>ko</code>]</p></div></div></div></ul>

Screenshots

image

image

@developer-betandeal developer-betandeal added the bug Something isn't working label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant