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

Add example/examples on parameters #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thaichat04
Copy link
Contributor

From #28, add example/examples sections in result

@manchenkoff manchenkoff self-assigned this Sep 2, 2024
@manchenkoff manchenkoff self-requested a review September 2, 2024 21:02
@manchenkoff manchenkoff assigned thaichat04 and unassigned manchenkoff Sep 2, 2024
# example: Optional[Any] # TODO
# examples: list[Any] = field(default_factory=list) # TODO
example: Optional[Any] = None
examples: list[Any] = field(default_factory=list)
Copy link
Owner

Choose a reason for hiding this comment

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

After checking the docs for v3 spec, it looks like it won't work with a list type. It should work with dict-like structure, where the key is a string and the value is an Example object, here you can find more details - Parameter object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I see. Thanks. People are amusing on changing spec every time :)

tests/openapi_fixture.py Show resolved Hide resolved
Copy link
Owner

@manchenkoff manchenkoff left a comment

Choose a reason for hiding this comment

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

Still missing examples type for dict-like structures and unit tests (as provided example in the comment)

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

Successfully merging this pull request may close these issues.

2 participants