Skip to content

Commit

Permalink
verify nested namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewuu committed Sep 10, 2024
1 parent fbf4b18 commit 5067c79
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 359 deletions.
29 changes: 29 additions & 0 deletions test/fixtures/types/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,34 @@ export default {
'x-title': 'List foos',
},
},
'/bars/baz/quexes/get': {
get: {
operationId: 'QuexesGetGet',
responses: {
200: {
content: {
'application/json': {
schema: {
properties: {
ok: { type: 'boolean' },
foo: { $ref: '#/components/schemas/bars' },
},
required: ['quex', 'ok'],
type: 'object',
},
},
},
description: 'Get a quex by ID.',
},
400: { description: 'Bad Request' },
401: { description: 'Unauthorized' },
},
security: [],
summary: '/bars/baz/quexes/get',
tags: ['/bars/baz/quexes'],
'x-response-key': 'quex',
'x-title': 'Get a quex',
},
},
},
}
64 changes: 64 additions & 0 deletions test/snapshots/blueprint.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,38 @@ Generated by [AVA](https://avajs.dev).
path: '/foos',
subroutes: [],
},
{
endpoints: [
{
codeSamples: [],
deprecationMessage: '',
description: '',
isDeprecated: false,
isUndocumented: false,
name: 'get',
path: '/bars/baz/quexes/get',
request: {
methods: [
'GET',
],
parameters: [],
preferredMethod: 'GET',
semanticMethod: 'GET',
},
response: {
description: 'Unknown',
responseType: 'void',
},
title: 'Get a quex',
},
],
name: 'quexes',
namespace: {
path: '/bars/baz',
},
path: '/bars/baz/quexes',
subroutes: [],
},
],
title: 'Foo',
}
Expand Down Expand Up @@ -838,6 +870,38 @@ Generated by [AVA](https://avajs.dev).
path: '/foos',
subroutes: [],
},
{
endpoints: [
{
codeSamples: [],
deprecationMessage: '',
description: '',
isDeprecated: false,
isUndocumented: false,
name: 'get',
path: '/bars/baz/quexes/get',
request: {
methods: [
'GET',
],
parameters: [],
preferredMethod: 'GET',
semanticMethod: 'GET',
},
response: {
description: 'Unknown',
responseType: 'void',
},
title: 'Get a quex',
},
],
name: 'quexes',
namespace: {
path: '/bars/baz',
},
path: '/bars/baz/quexes',
subroutes: [],
},
],
title: 'Foo',
}
Binary file modified test/snapshots/blueprint.test.ts.snap
Binary file not shown.
Loading

0 comments on commit 5067c79

Please sign in to comment.