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

null example value leads to incorrect example JSON #997

Open
brunchboy opened this issue Jan 18, 2024 · 0 comments
Open

null example value leads to incorrect example JSON #997

brunchboy opened this issue Jan 18, 2024 · 0 comments

Comments

@brunchboy
Copy link

If we have an attribute in our response defined as follows:

          "providerExpiration": {
            "type": "string",
            "description": "When this provider (account) is configured to expire, if ever",
            "format": "date-time",
            "example": null
          }

the resulting example created by Rapidoc is invalid, it is missing a comma after the null:

"name": "Jackson Doe",
"providerExpiration": null
"providerId": "18d1dc35-0d80-4000-8734-63dfdee46d01",

If we remove the setting of the example value to null, a random timestamp is generated and rendered correctly with a subsequent comma:

"name": "Jackson Doe",
"providerExpiration": "1970-01-01T00:00:00.000Z",
"providerId": "18d1dbc3-b530-4000-82b9-f53653214a01",
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