Skip to content

Commit bbc2c97

Browse files
authored
Merge pull request #20 from kaz29/fix/openapi
fix openapi template
2 parents 7b65c5a + 8c8415a commit bbc2c97

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/config/Migrations/schema-dump-default.lock
77
/vendor/
88
/.idea/
9+
.DS_Store

templates/bake/element/Controller/add.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
new OA\Response(
3333
response: 201,
3434
description: 'OK',
35-
content: new OA\JsonContent(ref: '#components/schemas/{{ singularHumanName }}'),
35+
content: new OA\JsonContent(ref: '#/components/schemas/{{ singularHumanName }}'),
3636
),
3737
new OA\Response(response: 401, description: 'Unauthorized'),
3838
new OA\Response(response: 403, description: 'Forbidden'),
3939
new OA\Response(
4040
response: 422,
4141
description: 'Validation Error',
42-
content: new OA\JsonContent(ref: '#components/schemas/Application'),
42+
content: new OA\JsonContent(ref: '#/components/schemas/ValidationErrorResponse'),
4343
),
4444
]
4545
)]

templates/bake/element/Controller/edit.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
new OA\Response(
4747
response: 201,
4848
description: 'OK',
49-
content: new OA\JsonContent(ref: '#components/schemas/{{ singularHumanName }}'),
49+
content: new OA\JsonContent(ref: '#/components/schemas/{{ singularHumanName }}'),
5050
),
5151
new OA\Response(response: 401, description: 'Unauthorized'),
5252
new OA\Response(response: 403, description: 'Forbidden'),
5353
new OA\Response(
5454
response: 422,
5555
description: 'Validation Error',
56-
content: new OA\JsonContent(ref: '#components/schemas/Application'),
56+
content: new OA\JsonContent(ref: '#/components/schemas/ValidationErrorResponse'),
5757
),
5858
]
5959
)]

templates/bake/element/Controller/index.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
new OA\Response(
4747
response: 201,
4848
description: 'OK',
49-
content: new OA\JsonContent(ref: '#components/schemas/{{ singularHumanName }}'),
49+
content: new OA\JsonContent(ref: '#/components/schemas/{{ singularHumanName }}'),
5050
),
5151
new OA\Response(response: 401, description: 'Unauthorized'),
5252
new OA\Response(response: 403, description: 'Forbidden'),

templates/bake/element/Controller/view.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
content: new OA\JsonContent(
5151
type: 'object',
5252
allOf: [
53-
new OA\Schema(ref: '#components/schemas/{{ singularHumanName }}'),
53+
new OA\Schema(ref: '#/components/schemas/{{ singularHumanName }}'),
5454
new OA\Schema(
5555
properties: [
5656
{% for table in singularAssociations %}
@@ -77,7 +77,7 @@
7777
new OA\Response(
7878
response: 200,
7979
description: 'OK',
80-
content: new OA\JsonContent(ref: '#components/schemas/{{ singularHumanName }}'),
80+
content: new OA\JsonContent(ref: '#/components/schemas/{{ singularHumanName }}'),
8181
),
8282
{% endif %}
8383
new OA\Response(response: 401, description: 'Unauthorized'),

0 commit comments

Comments
 (0)