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

[Schema Inaccuracy] "GET /repos/{owner}/{repo}/issues" - incorrect schema for milestone parameter #226

Open
gr2m opened this issue Mar 5, 2021 · 2 comments
Labels
enhancement New feature or request P4

Comments

@gr2m
Copy link
Collaborator

gr2m commented Mar 5, 2021

Follow up to WordPress/gutenberg#29043 (comment) /cc @ockham

Schema Inaccuracy

      - name: milestone
        description: If an `integer` is passed, it should refer to a milestone by
          its `number` field. If the string `*` is passed, issues with any milestone
          are accepted. If the string `none` is passed, issues without milestones
          are returned.
        in: query
        required: false
        schema:
          type: string

Expected

The description says that the milestone parameter can also be a number

If an integer is passed, it should refer to a milestone by its number field. If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned.

Reproduction Steps

n/a

@mattpage
Copy link
Contributor

@gr2m - What this is saying is that the milestone query param can contain a string representation of an integer, e.g., "42". But because it also may have the value * or none its type is string.

@gr2m
Copy link
Collaborator Author

gr2m commented Jul 22, 2021

I'd expect that the schema would be a oneOf:

  • number
  • string enum with the permitted values * and none

@bruce bruce added enhancement New feature or request P4 and removed inaccuracy triaged labels Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P4
Projects
None yet
Development

No branches or pull requests

3 participants