Skip to content

Commit 0cc2966

Browse files
committed
style: fix format for JSON API spec
1 parent ebaa188 commit 0cc2966

File tree

1 file changed

+10
-34
lines changed

1 file changed

+10
-34
lines changed

tests/spec/jsonapi-media-type/schema.json

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
"paths": {
1919
"/pets": {
2020
"post": {
21-
"tags": [
22-
"pet"
23-
],
21+
"tags": ["pet"],
2422
"summary": "Add a new pet to the store.",
2523
"description": "Add a new pet to the store.",
2624
"operationId": "addPet",
@@ -30,9 +28,7 @@
3028
"application/vnd.api+json": {
3129
"schema": {
3230
"type": "object",
33-
"required": [
34-
"data"
35-
],
31+
"required": ["data"],
3632
"properties": {
3733
"data": {
3834
"$ref": "#/components/schemas/Pet"
@@ -54,9 +50,7 @@
5450
},
5551
"/pets/{petId}": {
5652
"patch": {
57-
"tags": [
58-
"pet"
59-
],
53+
"tags": ["pet"],
6054
"summary": "Update an existing pet.",
6155
"description": "Update an existing pet by Id.",
6256
"operationId": "updatePet",
@@ -77,9 +71,7 @@
7771
"application/vnd.api+json": {
7872
"schema": {
7973
"type": "object",
80-
"required": [
81-
"data"
82-
],
74+
"required": ["data"],
8375
"properties": {
8476
"data": {
8577
"$ref": "#/components/schemas/Pet"
@@ -104,38 +96,26 @@
10496
"schemas": {
10597
"Pet": {
10698
"type": "object",
107-
"required": [
108-
"type",
109-
"attributes"
110-
],
99+
"required": ["type", "attributes"],
111100
"properties": {
112101
"id": {
113102
"type": "string",
114103
"format": "uuid"
115104
},
116105
"type": {
117106
"type": "string",
118-
"enum": [
119-
"pet"
120-
]
107+
"enum": ["pet"]
121108
},
122109
"attributes": {
123110
"type": "object",
124-
"required": [
125-
"name",
126-
"photoUrls"
127-
],
111+
"required": ["name", "photoUrls"],
128112
"properties": {
129113
"name": {
130114
"type": "string"
131115
},
132116
"status": {
133117
"type": "string",
134-
"enum": [
135-
"available",
136-
"pending",
137-
"sold"
138-
]
118+
"enum": ["available", "pending", "sold"]
139119
},
140120
"photoUrls": {
141121
"type": "array",
@@ -166,9 +146,7 @@
166146
"application/vnd.api+json": {
167147
"schema": {
168148
"type": "object",
169-
"required": [
170-
"data"
171-
],
149+
"required": ["data"],
172150
"properties": {
173151
"data": {
174152
"$ref": "#/components/schemas/Pet"
@@ -184,9 +162,7 @@
184162
"application/vnd.api+json": {
185163
"schema": {
186164
"type": "object",
187-
"required": [
188-
"errors"
189-
],
165+
"required": ["errors"],
190166
"properties": {
191167
"errors": {
192168
"type": "array",

0 commit comments

Comments
 (0)