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

docs(openapi): q query string param, fix id path parameter, nix refactor #1087

Merged
merged 5 commits into from May 12, 2024

Conversation

Indyandie
Copy link
Contributor

OpenAPI Docs

  • q query string param
  • fix id path parameter
  • nix refactor

Related #1078 #1065

@Indyandie
Copy link
Contributor Author

@Naramsim

@Naramsim
Copy link
Member

Hi, when trying your schema here: https://editor-next.swagger.io/

I don't see the q parameter for /abilities/, is it missing somewhere? On the other hand, if I check out /berries/ I have q but it's weirdly formatted:
swagger

Also, I don't really like the fat that we are adding other code to every method just for documenting one querystring. Can't we treat q like offset or limit?

@Indyandie
Copy link
Contributor Author

I'll take a look and try to figure how to apply it like offset and limit. Where are those defined? Sorry i am not too familiar with django... 😅

@Indyandie
Copy link
Contributor Author

@Naramsim I got rid of all that unnecessary code. All the endpoints that use PokeapiCommonViewset should pick up the definitions. The formatting is probably that swagger isn't reading the quoteblock properly.

@Naramsim
Copy link
Member

Nice! Thanks a lot! If you have time, would you be able to fix the quoteblock strange formatting? Also, in the console I see other errors and warnings.

Many thanks!

@Naramsim Naramsim added the no-deploy Instructs the updater-bot not to deploy this PR label May 12, 2024
@Naramsim Naramsim merged commit fa9aa4f into PokeAPI:master May 12, 2024
3 checks passed
@pokeapi-machine-user
Copy link

This Pull Request won't be deployed since the label no-deploy was found in its meta-data.

@Indyandie Indyandie deleted the docs/q_query_string_param branch May 12, 2024 18:46
@Indyandie
Copy link
Contributor Author

Nice! Thanks a lot! If you have time, would you be able to fix the quoteblock strange formatting? Also, in the console I see other errors and warnings.

Many thanks!

@Naramsim what command is generating the errors and warnings, can you share them? Or can you create an issue with all the details?

@Naramsim
Copy link
Member

If you go here and input your openapi URL and then wait 15 seconds, a popup opens up in the bottom part and you can see something like:

Severity Line Code Message
  9320 7010601 tags must be an array of Tag Objects
  2795 10069 property "example" is deprecated, use "examples" instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-deploy Instructs the updater-bot not to deploy this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants