Skip to content

Instantly share code, notes, and snippets.

@GabrielCastro
Last active March 25, 2021 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GabrielCastro/dc4c5555d720d359b77c720d35e85732 to your computer and use it in GitHub Desktop.
Save GabrielCastro/dc4c5555d720d359b77c720d35e85732 to your computer and use it in GitHub Desktop.
Buggy swagger api schema
openapi: 3.0.1
info:
title: Buggy Api
version: "1.0"
servers:
- url: /
paths:
/foo/bar1:
post:
responses:
"200":
content:
'*/*':
schema:
additionalProperties:
type: object
type: object
description: ok
/foo/bar2:
post:
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/bar2'
description: ok
components:
schemas:
bar2:
type: object
properties:
n:
type: number
x-original-swagger-version: "2.0"
swagger: '2.0'
info:
title: 'Buggy Api'
version: '1.0'
consumes:
- application/json
paths:
/foo/bar:
post:
responses:
'200':
description: ok
schema:
type: object
additionalProperties: false
properties:
n:
type: number
/foo/bar2:
post:
responses:
'200':
description: ok
schema:
$ref: '#/definitions/bar2'
definitions:
bar2:
type: object
additionalProperties: false
properties:
n:
type: number
openapi: 3.0.1
info:
title: Buggy Api
version: "1.0"
servers:
- url: /
paths:
/foo/bar1:
post:
responses:
"200":
description: ok
content:
'*/*':
schema:
type: object
additionalProperties: false
properties:
n:
type: number
/foo/bar2:
post:
responses:
"200":
description: ok
content:
'*/*':
schema:
$ref: '#/components/schemas/bar2'
components:
schemas:
bar2:
type: object
properties:
n:
type: number
x-original-swagger-version: "2.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment