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

Request example values for date and date-time properties change on each docs generation #819

Open
TheCatLady opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TheCatLady
Copy link

Describe the bug

Request example values for date and date-time properties change each time OpenAPI docs are generated.

This seems to be the reason why specific endpoints had always-changing frontmatter api props (#692).

Expected behavior

The example values should not change.

Current behavior

The example values always reflect the current date/time.

Possible solution

Provide a value to the Date() constructor here:

date: () => new Date().toISOString().substring(0, 10),
"date-time": () => new Date().toISOString(),

Context

Generated OpenAPI docs are checked into our repo, so unless the API spec changes (or there are updates to the plugin/theme) there should not be changes to the generated docs pages.

Your Environment

@TheCatLady TheCatLady added the bug Something isn't working label May 8, 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