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

refactor the allOf structure of InvalidParamProblem to have it extend from Problem in openapi-generator #2

Merged
merged 1 commit into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/main/openapi/problem/v1/problem-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ components:
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
$ref: "#/components/schemas/Problem"
description: a problem
schemas:
Problem:
Expand Down Expand Up @@ -43,15 +43,15 @@ components:
description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
InvalidParamProblem:
description: Problem details for invalid input parameter(s)
type: object
allOf:
- $ref: '#/components/schemas/Problem'
- type: object
properties:
invalidParams:
type: array
description: An array of parameter OpenAPI violations
items:
$ref: '#/components/schemas/InvalidParam'
- $ref: "#/components/schemas/Problem"
properties:
invalidParams:
type: array
description: An array of parameter OpenAPI violations
items:
$ref: "#/components/schemas/InvalidParam"
InvalidParam:
type: object
properties:
Expand Down
18 changes: 9 additions & 9 deletions src/main/swagger/problem/v1/problem-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ responses:
ProblemResponse:
description: a problem
schema:
$ref: '#/definitions/Problem'
$ref: "#/definitions/Problem"
definitions:
Problem:
description: A Problem Details object (RFC 7807)
Expand Down Expand Up @@ -39,15 +39,15 @@ definitions:
description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
InvalidParamProblem:
description: Problem details for invalid input parameter(s)
type: object
allOf:
- $ref: '#/definitions/Problem'
- type: object
properties:
invalidParams:
type: array
description: An array of parameter OpenAPI violations
items:
$ref: '#/definitions/InvalidParam'
- $ref: "#/definitions/Problem"
properties:
invalidParams:
type: array
description: An array of parameter OpenAPI violations
items:
$ref: "#/definitions/InvalidParam"
InvalidParam:
type: object
properties:
Expand Down