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

Incorrect type for labels parameter: "array of undefineds" #549

Closed
gr2m opened this issue Oct 15, 2020 · 6 comments
Closed

Incorrect type for labels parameter: "array of undefineds" #549

gr2m opened this issue Oct 15, 2020 · 6 comments
Labels
content This issue or pull request belongs to the Docs Content team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team

Comments

@gr2m
Copy link
Contributor

gr2m commented Oct 15, 2020

What article on docs.github.com is affected?

https://docs.github.com/en/free-pro-team@latest/rest/reference/issues#create-an-issue

What part(s) of the article would you like to see updated?

  1. https://docs.github.com/en/free-pro-team@latest/rest/reference/issues#update-an-issue--parameters
  2. https://docs.github.com/en/free-pro-team@latest/rest/reference/issues#create-an-issue--parameters

The labels parameter's type is listed as array of undefineds

Additional information

image

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 15, 2020
@janiceilene
Copy link
Contributor

Thanks for opening an issue @gr2m 💝

@janiceilene janiceilene added content This issue or pull request belongs to the Docs Content team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team and removed triage Do not begin working on this issue until triaged by the team labels Oct 15, 2020
@casals
Copy link
Contributor

casals commented Oct 16, 2020

This seems to be a bit more complicated than content only:

  • The content page where the issue is perceived (docs/edit/main/content/rest/reference/issues.md) uses an specific include for describing REST operations (docs/includes/rest_operation.html);
  • The include file above programatically parses the operation descriptions contained in the npm package @github/rest-api-operations;
  • While the referenced repository for this package (https://github.com/github/rest-api-operations) is not publicly available, you can find the same descriptions at https://github.com/github/rest-api-description (was the first deprecated in favor of the latter?)
  • According to the related operation description contained in api.github.com.json (line 29364), the labels parameter is an array that requires either a string or an object with multiple parameters.

My guess is that the property parsing mechanism doesn't do well with the oneOf array property (which establishes the either condition), so it returns array of undefined as the property type for labels (should be: something like array of string OR object).

@janiceilene perhaps the best course of action here would be to re-triage this to engineering - what do you think?

@gr2m
Copy link
Contributor Author

gr2m commented Oct 17, 2020

Amazing analysis 👍🏼

@runleonarun
Copy link
Contributor

@casals and @gr2m
It looks like you're correct:

              oneOf:
                - type: string
                - type: object

I will discuss it with the Docs Ecosystem team and triage it on our project board to get it fixed.

@rachmari
Copy link
Contributor

@gr2m, this looks like a bug with our internal schema. I don't think we allow creating an issue with an array of label objects only an array of strings. I'm going to verify this with the owner of the API.

@janiceilene
Copy link
Contributor

This has been moved to our internal repo, so I'm going to close out this PR. Thank so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team
Projects
None yet
Development

No branches or pull requests

5 participants