Skip to content

Fix schemas/Error code property in Uber example #1144

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

Merged
merged 1 commit into from
Jun 9, 2017
Merged

Fix schemas/Error code property in Uber example #1144

merged 1 commit into from
Jun 9, 2017

Conversation

OJFord
Copy link
Contributor

@OJFord OJFord commented Jun 4, 2017

The live API returns e.g.:

{
    "message": "No authentication provided.",
    "code": "unauthorized"
}

This commit corrects the schema for code to be of type: string.

The [live API returns][Uber products GET] e.g.:

    {
        "message": "No authentication provided.",
        "code": "unauthorized"
    }

This commit corrects the schema for `code` to be of `type: string`.

[Uber products GET]: https://api.uber.com/v1/products
@webron
Copy link
Member

webron commented Jun 5, 2017

Aha! So I'm not sure we're actually looking to accurately describe the Uber API but! Are you sure it's always a string?

@OJFord
Copy link
Contributor Author

OJFord commented Jun 6, 2017

I'm not sure we're actually looking to accurately describe the Uber API

Ah, sorry, I should have guessed it wasn't intended to be a 'real' example from the fact that the 'petstore' example isn't live at all. (I initially assumed that it was a live demo.)

Are you sure it's always a string?

No, I'm not sure. But I don't believe sum types are supported? Which I suppose doesn't matter if this isn't intended to be a live example.

@MikeRalphson
Copy link
Member

Ah, sorry, I should have guessed it wasn't intended to be a 'real' example from the fact that the 'petstore' example isn't live at all. (I initially assumed that it was a live demo.)

Petstore is live at petstore.swagger.io/v2 - is there a link which is not working?

@OJFord
Copy link
Contributor Author

OJFord commented Jun 6, 2017

Ah! All (v2/3 YAML/JSON) schemata point to /v1.

@RobDolinMS
Copy link
Contributor

Thank you @OJFord for this PR.

Replying to @webron's question:

Are you sure it's always a string?

Uber's API documentation at: https://developer.uber.com/docs/riders/guides/errors#error-format says that code is a string.

LGTM

@RobDolinMS RobDolinMS self-requested a review June 6, 2017 18:20
@RobDolinMS
Copy link
Contributor

#TDC: Thank you @OJFord for this.

@RobDolinMS RobDolinMS merged commit a5745ab into OAI:OpenAPI.next Jun 9, 2017
@OJFord OJFord deleted the patch-1 branch June 9, 2017 17:58
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.

4 participants