Skip to content

Update OpenAPI Descriptions #230

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

Conversation

github-openapi-bot
Copy link
Collaborator

👋 humans. This PR updates the OpenAPI description with the latest changes.

deprecated: true
required: false
schema:
type: string
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest not to publicly document legacy parameters. They will find their way into the SDKs through code generation and instead of fewer people using them, it will be more.

Copy link

Choose a reason for hiding this comment

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

That's a good call. We want to document legacy parameters when they have been documented before, but not the ones that were never described since the existence of this document. I'll open a PR to filter those with a special attribute.

READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
tags:
- repos
operationId: repos/get-readme-from-alt-path
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the operationId could be more descriptive. Changing it later will cause friction, as it will result in method name changes in the SDKs

Suggested change
operationId: repos/get-readme-from-alt-path
operationId: repos/get-readme-in-directory

Also I wonder if the new endpoint is necessary? I wonder if you considered adding a dir query parameter to the existing repos/get-readme operation? It would be an optional parameter and hence not a breaking change?

Copy link

Choose a reason for hiding this comment

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

Agreed, this should be better described. Will fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is currently a publicly available endpoint (with traffic) that was never documented but also never deprecated. Adding it to the description in this case seems the like best course of action in this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, this should be better described. Will fix.

you did not change the operationId. Can you still do that, if you prefer repos/get-readme-in-directory? The operation ID is not impacting users of the REST API, but better names will make the SDK method easier to understand

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please change the operation ID to repos/get-readme-in-directory? The operation ID has path, but the query parameter is dir, it's not coherent.

The operation summary is still "Get a repository README" and externalDocs.url is https://docs.github.com/rest/reference/repos#get-a-repository-readme, both need to be changed, looks like a copy and paste oversight

@imwiss @xuorig ☝🏼

@@ -7984,6 +8005,17 @@ paths:
- "$ref": "#/components/parameters/org"
- "$ref": "#/components/parameters/per_page"
- "$ref": "#/components/parameters/page"
- name: exclude
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you consider adding an exclude parameter globally to all endpoints?

In this PR you introduce exclude and excludedAttributes (see below). Maybe use one name to keep it coherent?

Copy link

Choose a reason for hiding this comment

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

@gr2m unfortunately these are not new parameters, but rather ones we've identified as missing. I agree with you on consistency, some we keep an eye for going forward.

@@ -29119,6 +29310,18 @@ paths:
- "$ref": "#/components/parameters/enterprise"
- "$ref": "#/components/parameters/start_index"
- "$ref": "#/components/parameters/count"
- name: filter
description: filter results
Copy link
Contributor

Choose a reason for hiding this comment

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

how does filter work?

Copy link

Choose a reason for hiding this comment

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

I'll an open an issue to get a better description on this 👍

@@ -69369,6 +69606,7 @@ components:
schema:
type: string
enum:
- ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Just making sure: is this intentional?

Copy link

Choose a reason for hiding this comment

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

Yup, empty string is actually a valid input for this enum 😅

@gr2m
Copy link
Contributor

gr2m commented Mar 11, 2021

@imwiss could you look into these ☝🏼 I have to pause updating the @octokit SDKs until my questions have been addressed. Not a big deal, but the longer we wait, the harder the change reviews get

@bruce bruce closed this Mar 12, 2021
@xuorig
Copy link

xuorig commented Mar 12, 2021

Thanks for catching those @gr2m, we did a lot of changes due to our whole test suite running against this description now. They all make this spec more accurate but we'll make the necessary changes to make descriptions/naming better per your suggestions 👍

@shiftkey shiftkey deleted the openapi-update-147cf7c7f19098caa9160c3dae17d19bf7e8c5d559cceabfb4ff9bdbee945a3c branch February 20, 2024 22:14
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.

5 participants