File tree Expand file tree Collapse file tree 6 files changed +311
-0
lines changed
renamed-route-new-operation-id Expand file tree Collapse file tree 6 files changed +311
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "openapi" : " 3.0.3" ,
3+ "info" : {
4+ "title" : " Test API" ,
5+ "description" : " A sample API to for testing" ,
6+ "version" : " 1.0.0"
7+ },
8+ "servers" : [
9+ {
10+ "url" : " https://api.example.com/v1"
11+ }
12+ ],
13+ "paths" : {
14+ "/user" : {
15+ "post" : {
16+ "summary" : " Creates a new user profile" ,
17+ "operationId" : " createUser" ,
18+ "requestBody" : {
19+ "required" : true ,
20+ "content" : {
21+ "application/json" : {
22+ "schema" : {
23+ "$ref" : " #/components/schemas/NewUser"
24+ }
25+ }
26+ }
27+ },
28+ "responses" : {
29+ "201" : {
30+ "description" : " User created successfully" ,
31+ "content" : {
32+ "application/json" : {
33+ "schema" : {
34+ "$ref" : " #/components/schemas/User"
35+ }
36+ }
37+ }
38+ }
39+ }
40+ }
41+ }
42+ },
43+ "components" : {
44+ "schemas" : {
45+ "User" : {
46+ "type" : " object" ,
47+ "properties" : {
48+ "id" : {
49+ "type" : " string"
50+ },
51+ "name" : {
52+ "type" : " string"
53+ },
54+ "email" : {
55+ "type" : " string"
56+ }
57+ }
58+ },
59+ "NewUser" : {
60+ "type" : " object" ,
61+ "required" : [
62+ " name" ,
63+ " email"
64+ ],
65+ "properties" : {
66+ "name" : {
67+ "type" : " string"
68+ },
69+ "email" : {
70+ "type" : " string"
71+ }
72+ }
73+ }
74+ }
75+ }
76+ }
Original file line number Diff line number Diff line change 1+ ## Added
2+ - [ POST] ` /user `
3+
4+ ## Removed
5+ - [ POST] ` /users `
Original file line number Diff line number Diff line change 1+ {
2+ "openapi" : " 3.0.3" ,
3+ "info" : {
4+ "title" : " Test API" ,
5+ "description" : " A sample API to for testing" ,
6+ "version" : " 1.0.0"
7+ },
8+ "servers" : [
9+ {
10+ "url" : " https://api.example.com/v1"
11+ }
12+ ],
13+ "paths" : {
14+ "/users" : {
15+ "post" : {
16+ "summary" : " Creates a new user profile" ,
17+ "operationId" : " createNewUser" ,
18+ "requestBody" : {
19+ "required" : true ,
20+ "content" : {
21+ "application/json" : {
22+ "schema" : {
23+ "$ref" : " #/components/schemas/NewUser"
24+ }
25+ }
26+ }
27+ },
28+ "responses" : {
29+ "201" : {
30+ "description" : " User created successfully" ,
31+ "content" : {
32+ "application/json" : {
33+ "schema" : {
34+ "$ref" : " #/components/schemas/User"
35+ }
36+ }
37+ }
38+ }
39+ }
40+ }
41+ }
42+ },
43+ "components" : {
44+ "schemas" : {
45+ "User" : {
46+ "type" : " object" ,
47+ "properties" : {
48+ "id" : {
49+ "type" : " string"
50+ },
51+ "name" : {
52+ "type" : " string"
53+ },
54+ "email" : {
55+ "type" : " string"
56+ }
57+ }
58+ },
59+ "NewUser" : {
60+ "type" : " object" ,
61+ "required" : [
62+ " name" ,
63+ " email"
64+ ],
65+ "properties" : {
66+ "name" : {
67+ "type" : " string"
68+ },
69+ "email" : {
70+ "type" : " string"
71+ }
72+ }
73+ }
74+ }
75+ }
76+ }
Original file line number Diff line number Diff line change 1+ {
2+ "openapi" : " 3.0.3" ,
3+ "info" : {
4+ "title" : " Test API" ,
5+ "description" : " A sample API to for testing" ,
6+ "version" : " 1.0.0"
7+ },
8+ "servers" : [
9+ {
10+ "url" : " https://api.example.com/v1"
11+ }
12+ ],
13+ "paths" : {
14+ "/user" : {
15+ "post" : {
16+ "summary" : " Creates a new user profile" ,
17+ "operationId" : " createUser" ,
18+ "requestBody" : {
19+ "required" : true ,
20+ "content" : {
21+ "application/json" : {
22+ "schema" : {
23+ "$ref" : " #/components/schemas/NewUser"
24+ }
25+ }
26+ }
27+ },
28+ "responses" : {
29+ "201" : {
30+ "description" : " User created successfully" ,
31+ "content" : {
32+ "application/json" : {
33+ "schema" : {
34+ "$ref" : " #/components/schemas/User"
35+ }
36+ }
37+ }
38+ }
39+ }
40+ }
41+ }
42+ },
43+ "components" : {
44+ "schemas" : {
45+ "User" : {
46+ "type" : " object" ,
47+ "properties" : {
48+ "id" : {
49+ "type" : " string"
50+ },
51+ "name" : {
52+ "type" : " string"
53+ },
54+ "email" : {
55+ "type" : " string"
56+ }
57+ }
58+ },
59+ "NewUser" : {
60+ "type" : " object" ,
61+ "required" : [
62+ " name" ,
63+ " email"
64+ ],
65+ "properties" : {
66+ "name" : {
67+ "type" : " string"
68+ },
69+ "email" : {
70+ "type" : " string"
71+ }
72+ }
73+ }
74+ }
75+ }
76+ }
Original file line number Diff line number Diff line change 1+ ## Renamed
2+ - [ POST] ` /users ` → ` /user `
Original file line number Diff line number Diff line change 1+ {
2+ "openapi" : " 3.0.3" ,
3+ "info" : {
4+ "title" : " Test API" ,
5+ "description" : " A sample API to for testing" ,
6+ "version" : " 1.0.0"
7+ },
8+ "servers" : [
9+ {
10+ "url" : " https://api.example.com/v1"
11+ }
12+ ],
13+ "paths" : {
14+ "/users" : {
15+ "post" : {
16+ "summary" : " Creates a new user profile" ,
17+ "operationId" : " createUser" ,
18+ "requestBody" : {
19+ "required" : true ,
20+ "content" : {
21+ "application/json" : {
22+ "schema" : {
23+ "$ref" : " #/components/schemas/NewUser"
24+ }
25+ }
26+ }
27+ },
28+ "responses" : {
29+ "201" : {
30+ "description" : " User is created successfully" ,
31+ "content" : {
32+ "application/json" : {
33+ "schema" : {
34+ "$ref" : " #/components/schemas/User"
35+ }
36+ }
37+ }
38+ }
39+ }
40+ }
41+ }
42+ },
43+ "components" : {
44+ "schemas" : {
45+ "User" : {
46+ "type" : " object" ,
47+ "properties" : {
48+ "id" : {
49+ "type" : " string"
50+ },
51+ "name" : {
52+ "type" : " string"
53+ },
54+ "email" : {
55+ "type" : " string"
56+ }
57+ }
58+ },
59+ "NewUser" : {
60+ "type" : " object" ,
61+ "required" : [
62+ " name" ,
63+ " email"
64+ ],
65+ "properties" : {
66+ "name" : {
67+ "type" : " string"
68+ },
69+ "email" : {
70+ "type" : " string"
71+ }
72+ }
73+ }
74+ }
75+ }
76+ }
You can’t perform that action at this time.
0 commit comments