Skip to content

Fixed a badly formatted example #4851

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miguelgrinberg
Copy link
Contributor

This particular example was not correctly parsed by the request converter. I have fixed it to match what the description of the example says.

Copy link
Contributor

github-actions bot commented Jul 9, 2025

Following you can find the validation changes against the target branch for the APIs.

No changes detected.

You can validate these APIs yourself by using the make validate target.


\ }

value: |-
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really have a way to define examples that issue multiple requests, so I'm putting the 2nd and 3rd requests in the value key.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem like a valid OpenAPI example to me. Linters that check the request body example against the schema (we currently have those linting rules turned off) would fail due to those extra API requests in the value. I think we need to stick to one API request body per yaml file.

Copy link
Contributor Author

@miguelgrinberg miguelgrinberg Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current version of this example has two requests. And the method_request key in this example file is set to the "close index" endpoint, which does not take a body, and for that reason fails parsing in the request converter.

If we have to use one request per example, then maybe it is best to remove this example?

FYI, this is how the current two-request version looks in the official docs:

Screenshot 2025-07-10 at 10 40 44 AM

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

Successfully merging this pull request may close these issues.

2 participants