Skip to content

Commit 3f75c4f

Browse files
Hide inline type name (#22)
* test(demo): add stevetest * feat: hide inline type 'default' name * test: add test for inline type name * chore(deps): regenerate package-lock.json * 4.3.2
1 parent 0835231 commit 3f75c4f

File tree

11 files changed

+1743
-901
lines changed

11 files changed

+1743
-901
lines changed

demo/apis.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"SE-11508/SE-11508.raml": "RAML 1.0",
99
"APIC-463/APIC-463.raml": "RAML 1.0",
1010
"SE-12291/SE-12291.json": "OAS 2.0",
11-
"anyOf/anyOf.yaml": "ASYNC 2.0"
11+
"anyOf/anyOf.yaml": "ASYNC 2.0",
12+
"steveTest-1/stevetest.json": "OAS 2.0"
1213
}

demo/steveTest-1/exchange.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"main": "stevetest.json",
3+
"name": "steveTest",
4+
"classifier": "oas",
5+
"tags": []
6+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema",
3+
"id": "http://example.com/example.json",
4+
"type": "object",
5+
"required": [
6+
"logonID",
7+
"site",
8+
"siteRole",
9+
"acceptedDate"
10+
],
11+
"properties": {
12+
"logonID": {
13+
"id": "#/properties/logonID",
14+
"type": "string",
15+
"description": "OneAmerica user's application logonID.",
16+
"example": "indybrad"
17+
},
18+
"site": {
19+
"id": "#/properties/site",
20+
"type": "string",
21+
"description": "OneAmerica web application identifier within which user is accepting terms.",
22+
"example": "ACCTSERV"
23+
},
24+
"siteRole": {
25+
"id": "#/properties/siteRole",
26+
"type": "string",
27+
"description": "OneAmerica user's role within the web application.",
28+
"example": "PARTCPNT"
29+
},
30+
"impersonationID": {
31+
"id": "#/properties/impersonationID",
32+
"type": "string",
33+
"description": "OneAmerica user account that is accepting on behalf of the actual OneAmerica user.",
34+
"example": "xyz123"
35+
},
36+
"acceptedDate": {
37+
"id": "#/properties/acceptedDate",
38+
"type": "string",
39+
"description": "Datetime of acceptance of terms by the OneAmerica user.",
40+
"example": "2018-01-01T12:00:00.000"
41+
}
42+
}
43+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema",
3+
"id": "http://example.com/example.json",
4+
"type": "object",
5+
"default": {},
6+
"additionalProperties": true,
7+
"properties": {
8+
"logonID": {
9+
"id": "#/properties/logonID",
10+
"type": "string",
11+
"description": "OneAmerica user's application logonID."
12+
},
13+
"accepted": {
14+
"id": "#/properties/accepted",
15+
"type": "boolean",
16+
"description": "True/False indicator on whether legal terms were accepted."
17+
},
18+
"acceptedDate": {
19+
"id": "#/properties/acceptedDate",
20+
"type": "string",
21+
"description": "Date of acceptance of legal terms."
22+
}
23+
}
24+
}

demo/steveTest-1/stevetest.json

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Legal System Service v1",
5+
"description": "This is the suite of Participant Legal services.",
6+
"version": "1.0.0",
7+
"termsOfService": "http://www.oneamerica.com",
8+
"contact": {
9+
"email": "jedimaster@oneamerica.com"
10+
},
11+
"license": {
12+
"name": "OneAmerica 1.0"
13+
}
14+
},
15+
"host": "esb.oneamerica.com:61006",
16+
"basePath": "/api",
17+
"schemes": [
18+
"https"
19+
],
20+
"consumes": [
21+
"application/json"
22+
],
23+
"produces": [
24+
"application/json"
25+
],
26+
"tags": [
27+
{
28+
"name": "test",
29+
"description": "test"
30+
}
31+
],
32+
"parameters": {
33+
"trait:content-type-required:content-type": {
34+
"required": true,
35+
"type": "string",
36+
"in": "header",
37+
"name": "content-type"
38+
}
39+
},
40+
"paths": {
41+
"/legal/termsConditionsAcceptReset": {
42+
"delete": {
43+
"description": "Delete participants existing terms and conditions",
44+
"responses": {
45+
"200": {
46+
"description": "This status code will be returned when request passes"
47+
},
48+
"400": {
49+
"$ref": "traits/response-errors.json#/responses/400"
50+
},
51+
"404": {
52+
"$ref": "traits/response-errors.json#/responses/404"
53+
},
54+
"405": {
55+
"$ref": "traits/response-errors.json#/responses/405"
56+
},
57+
"406": {
58+
"$ref": "traits/response-errors.json#/responses/406"
59+
},
60+
"415": {
61+
"$ref": "traits/response-errors.json#/responses/406"
62+
},
63+
"500": {
64+
"$ref": "traits/response-errors.json#/responses/500"
65+
},
66+
"501": {
67+
"$ref": "traits/response-errors.json#/responses/501"
68+
}
69+
}
70+
}
71+
},
72+
"/legal/termsConditionsAccept": {
73+
"get": {
74+
"description": "Retrieves a user's status on terms and conditions acceptance.",
75+
"responses": {
76+
"200": {
77+
"description": "This status code will be returned when request passes.",
78+
"schema": {
79+
"$ref": "schemas_response/schema-termsConditionsAccept-Get.json"
80+
},
81+
"examples": {
82+
"application/json": {
83+
"logonID": "indybrad",
84+
"accepted" : true,
85+
"acceptedDate" : "2018-01-01T12:00:00.000"
86+
}
87+
}
88+
},
89+
"400": {
90+
"$ref": "traits/response-errors.json#/responses/400"
91+
},
92+
"404": {
93+
"$ref": "traits/response-errors.json#/responses/404"
94+
},
95+
"405": {
96+
"$ref": "traits/response-errors.json#/responses/405"
97+
},
98+
"406": {
99+
"$ref": "traits/response-errors.json#/responses/406"
100+
},
101+
"415": {
102+
"$ref": "traits/response-errors.json#/responses/406"
103+
},
104+
"500": {
105+
"$ref": "traits/response-errors.json#/responses/500"
106+
},
107+
"501": {
108+
"$ref": "traits/response-errors.json#/responses/501"
109+
}
110+
},
111+
"parameters": [
112+
{
113+
"required": true,
114+
"type": "string",
115+
"in": "header",
116+
"name": "webLogonID"
117+
},
118+
{
119+
"$ref": "#/parameters/trait:content-type-required:content-type"
120+
}
121+
]
122+
},
123+
"post": {
124+
"description": "Store participant's terms and conditions acceptance.",
125+
"responses": {
126+
"200": {
127+
"description": "This status code will be returned when request passes."
128+
},
129+
"400": {
130+
"$ref": "traits/response-errors.json#/responses/400"
131+
},
132+
"404": {
133+
"$ref": "traits/response-errors.json#/responses/404"
134+
},
135+
"405": {
136+
"$ref": "traits/response-errors.json#/responses/405"
137+
},
138+
"406": {
139+
"$ref": "traits/response-errors.json#/responses/406"
140+
},
141+
"415": {
142+
"$ref": "traits/response-errors.json#/responses/406"
143+
},
144+
"500": {
145+
"$ref": "traits/response-errors.json#/responses/500"
146+
},
147+
"501": {
148+
"$ref": "traits/response-errors.json#/responses/501"
149+
}
150+
},
151+
"parameters": [
152+
{
153+
"$ref": "#/parameters/trait:content-type-required:content-type"
154+
},
155+
{
156+
"in": "body",
157+
"name": "body",
158+
"schema": {
159+
"$ref": "schemas/schema-termsConditionsAccept.json"
160+
},
161+
"required": true
162+
}
163+
]
164+
}
165+
}
166+
}
167+
}
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"responses": {
3+
"400": {
4+
"description": "Status code and error message will be returned if validation fails.",
5+
"schema": {
6+
"$ref": "schema-response-errors.json#/properties/errorInfo"
7+
},
8+
"examples": {
9+
"application/json": {
10+
"errorInfo": [
11+
{
12+
"code": "400",
13+
"message": "Bad request",
14+
"detail": "Invalid request"
15+
}
16+
]
17+
}
18+
}
19+
},
20+
"404": {
21+
"description": "Resource not found for requested URI.",
22+
"schema": {
23+
"$ref": "schema-response-errors.json#/properties/errorInfo"
24+
},
25+
"examples": {
26+
"application/json": {
27+
"errorInfo": [
28+
{
29+
"code": "404",
30+
"message": "Resource not found",
31+
"detail": "Resource not found for requested URI"
32+
}
33+
]
34+
}
35+
}
36+
},
37+
"405": {
38+
"description": "Method not allowd for requested resource.",
39+
"schema": {
40+
"$ref": "schema-response-errors.json#/properties/errorInfo"
41+
},
42+
"examples": {
43+
"application/json": {
44+
"errorInfo": [
45+
{
46+
"code": "405",
47+
"message": "Method not allowed",
48+
"detail": "Method not allowed for requested resource"
49+
}
50+
]
51+
}
52+
}
53+
},
54+
"406": {
55+
"description": "Request headers are not acceptable.",
56+
"schema": {
57+
"$ref": "schema-response-errors.json#/properties/errorInfo"
58+
},
59+
"examples": {
60+
"application/json": {
61+
"errorInfo": [
62+
{
63+
"code": "406",
64+
"message": "Not acceptable",
65+
"detail": "Request accept headers are not acceptable"
66+
}
67+
]
68+
}
69+
}
70+
},
71+
"415": {
72+
"description": "Request format is not supported by the requested resource.",
73+
"schema": {
74+
"$ref": "schema-response-errors.json#/properties/errorInfo"
75+
},
76+
"examples": {
77+
"application/json": {
78+
"errorInfo": [
79+
{
80+
"code": "415",
81+
"message": "Unsupported media type",
82+
"detail": "Request format is not supported by the requested resource"
83+
}
84+
]
85+
}
86+
}
87+
},
88+
"500": {
89+
"description": "Status code and error message will be returned when the endpoint encounters an unexpected technical error",
90+
"schema": {
91+
"$ref": "schema-response-errors.json#/properties/errorInfo"
92+
},
93+
"examples": {
94+
"application/json": {
95+
"errorInfo": [
96+
{
97+
"code": "500",
98+
"message": "Unexpected server error",
99+
"detail": "Service encountered an unexpected error while processing the request"
100+
}
101+
]
102+
}
103+
}
104+
},
105+
"501": {
106+
"description": "Service method is not implemented.",
107+
"schema": {
108+
"$ref": "schema-response-errors.json#/properties/errorInfo"
109+
},
110+
"examples": {
111+
"application/json": {
112+
"errorInfo": [
113+
{
114+
"code": "501",
115+
"message": "Not Implemented",
116+
"detail": "Service method is not implemented"
117+
}
118+
]
119+
}
120+
}
121+
}
122+
}
123+
}

0 commit comments

Comments
 (0)