Skip to content

Commit 57086b5

Browse files
Copilotabraham
andcommitted
Update description format and regenerate schema
Co-authored-by: abraham <[email protected]>
1 parent 13007e3 commit 57086b5

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

dist/schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36875,7 +36875,7 @@
3687536875
},
3687636876
"AsyncRefreshResponse": {
3687736877
"type": "object",
36878-
"description": "Response wrapper containing a AsyncRefresh entity",
36878+
"description": "Response containing an AsyncRefresh object",
3687936879
"properties": {
3688036880
"async_refresh": {
3688136881
"$ref": "#/components/schemas/AsyncRefresh"
@@ -36887,7 +36887,7 @@
3688736887
},
3688836888
"CountResponse": {
3688936889
"type": "object",
36890-
"description": "Response wrapper containing a count value",
36890+
"description": "Response containing a count value",
3689136891
"properties": {
3689236892
"count": {
3689336893
"type": "integer"
@@ -36899,7 +36899,7 @@
3689936899
},
3690036900
"MergedResponse": {
3690136901
"type": "object",
36902-
"description": "Response wrapper containing a merged value",
36902+
"description": "Response containing a merged value",
3690336903
"properties": {
3690436904
"merged": {
3690536905
"type": "boolean"

src/__tests__/generators/TypeParser.hashWrapper.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
4444
// Should add the component to the spec
4545
expect(spec.components?.schemas?.['CountResponse']).toEqual({
4646
type: 'object',
47-
description: 'Response wrapper containing a count value',
47+
description: 'Response containing a count value',
4848
properties: {
4949
count: {
5050
type: 'integer',
@@ -68,7 +68,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
6868
// Should add the component to the spec
6969
expect(spec.components?.schemas?.['MergedResponse']).toEqual({
7070
type: 'object',
71-
description: 'Response wrapper containing a merged value',
71+
description: 'Response containing a merged value',
7272
properties: {
7373
merged: {
7474
type: 'integer',
@@ -94,7 +94,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
9494
// Should add the response wrapper component to the spec
9595
expect(spec.components?.schemas?.['AsyncRefreshResponse']).toEqual({
9696
type: 'object',
97-
description: 'Response wrapper containing a AsyncRefresh entity',
97+
description: 'Response containing an AsyncRefresh object',
9898
properties: {
9999
async_refresh: {
100100
$ref: '#/components/schemas/AsyncRefresh',
@@ -127,7 +127,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
127127
// Should add the response wrapper component to the spec
128128
expect(spec.components?.schemas?.['StatusResponse']).toEqual({
129129
type: 'object',
130-
description: 'Response wrapper containing a Status entity',
130+
description: 'Response containing an Status object',
131131
properties: {
132132
status: {
133133
$ref: '#/components/schemas/Status',
@@ -163,7 +163,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
163163
// Should add the component to the spec
164164
expect(spec.components?.schemas?.['MergedResponse']).toEqual({
165165
type: 'object',
166-
description: 'Response wrapper containing a merged value',
166+
description: 'Response containing a merged value',
167167
properties: {
168168
merged: {
169169
type: 'boolean',
@@ -187,7 +187,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
187187
// Should add the component to the spec
188188
expect(spec.components?.schemas?.['TotalResponse']).toEqual({
189189
type: 'object',
190-
description: 'Response wrapper containing a total value',
190+
description: 'Response containing a total value',
191191
properties: {
192192
total: {
193193
type: 'integer',
@@ -211,7 +211,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
211211
// Should add the component to the spec
212212
expect(spec.components?.schemas?.['NameResponse']).toEqual({
213213
type: 'object',
214-
description: 'Response wrapper containing a name value',
214+
description: 'Response containing a name value',
215215
properties: {
216216
name: {
217217
type: 'string',
@@ -237,7 +237,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
237237
// Should add the component to the spec
238238
expect(spec.components?.schemas?.['CountResponse']).toEqual({
239239
type: 'object',
240-
description: 'Response wrapper containing a count value',
240+
description: 'Response containing a count value',
241241
properties: {
242242
count: {
243243
type: 'integer',
@@ -261,7 +261,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
261261
// Should add the response wrapper component to the spec
262262
expect(spec.components?.schemas?.['AsyncRefreshResponse']).toEqual({
263263
type: 'object',
264-
description: 'Response wrapper containing a AsyncRefresh entity',
264+
description: 'Response containing an AsyncRefresh object',
265265
properties: {
266266
async_refresh: {
267267
$ref: '#/components/schemas/AsyncRefresh',
@@ -285,7 +285,7 @@ describe('TypeParser - Hash wrapper pattern handling', () => {
285285
// Should add the component to the spec
286286
expect(spec.components?.schemas?.['EnabledResponse']).toEqual({
287287
type: 'object',
288-
description: 'Response wrapper containing a enabled value',
288+
description: 'Response containing a enabled value',
289289
properties: {
290290
enabled: {
291291
type: 'boolean',

src/generators/TypeParser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class TypeParser {
200200
if (!spec.components.schemas[responseName]) {
201201
spec.components.schemas[responseName] = {
202202
type: 'object',
203-
description: `Response wrapper containing a ${keyName} value`,
203+
description: `Response containing a ${keyName} value`,
204204
properties: {
205205
[keyName]: {
206206
type: 'integer',
@@ -256,7 +256,7 @@ class TypeParser {
256256
if (!spec.components.schemas[responseName]) {
257257
spec.components.schemas[responseName] = {
258258
type: 'object',
259-
description: `Response wrapper containing a ${keyName} value`,
259+
description: `Response containing a ${keyName} value`,
260260
properties: {
261261
[keyName]: {
262262
type: openApiType,
@@ -302,7 +302,7 @@ class TypeParser {
302302
if (!spec.components.schemas[responseName]) {
303303
spec.components.schemas[responseName] = {
304304
type: 'object',
305-
description: `Response wrapper containing a ${entityName} entity`,
305+
description: `Response containing an ${entityName} object`,
306306
properties: {
307307
[keyName]: {
308308
$ref: `#/components/schemas/${sanitizedEntityName}`,

0 commit comments

Comments
 (0)