-
-
Save zburgermeiszter/03ed1f87abbf5b64fc5d0d20280ba6b9 to your computer and use it in GitHub Desktop.
Example of using `allOf` to extend an object in a Swagger API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
version: "1.0.0" | |
title: minimal | |
description: News Articles ftw | |
paths: | |
/users: | |
get: | |
responses: | |
"200": | |
description: hello world | |
definitions: | |
NewsArticle: | |
title: NewsArticle | |
type: object | |
properties: | |
id: | |
type: integer | |
format: int32 | |
x-mysql-type: int(11) | |
NewsArticleExt: # tmp | |
title: NewsArticleExt | |
type: object | |
allOf: | |
- $ref: "#/definitions/NewsArticle" | |
- properties: | |
test: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment