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

public.json: Adjust anyOf syntax to use schema and $ref #35

Merged
merged 1 commit into from
Oct 7, 2015

Conversation

wking
Copy link
Contributor

@wking wking commented Oct 1, 2015

I landed the previous syntax in 168a97b (public.json: Add '{GET|POST}
/payment-methods' and 'GET /payment-method/{id} ' endpoints,
2015-02-11), which pointed out that anyOf isn't valid Swagger 2.0.
But it's looking like the consensus is around including it in the next
Swagger release 1. The JSON Schema example I was following 2
didn't use $ref in their example, but they do use $ref in their allOf
example 3. This commit updates the existing anyOf uses to match
that syntax.

I landed the previous syntax in 168a97b (public.json: Add '{GET|POST}
/payment-methods' and 'GET /payment-method/{id} ' endpoints,
2015-02-11), which pointed out that anyOf isn't valid Swagger 2.0.
But it's looking like the consensus is around including it in the next
Swagger release [1].  The JSON Schema example I was following [2]
didn't use $ref in their example, but they do use $ref in their allOf
example [3].  This commit updates the existing anyOf uses to match
that syntax.

[1]: OAI/OpenAPI-Specification#57 (comment)
[2]: http://spacetelescope.github.io/understanding-json-schema/reference/combining.html#anyof
[3]: http://spacetelescope.github.io/understanding-json-schema/reference/combining.html#allof
caseybessette added a commit that referenced this pull request Oct 7, 2015
public.json: Adjust anyOf syntax to use schema and $ref
@caseybessette caseybessette merged commit 7aa5c1f into master Oct 7, 2015
@caseybessette caseybessette deleted the tk/improved-anyOf-syntax branch October 7, 2015 23:34
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.

2 participants