Skip to content

Commit a88a6b4

Browse files
authored
Merge pull request #23 from acrontum/fix/root-ref-models
fix/root-ref-models
2 parents ebedfdd + 4c2feb4 commit a88a6b4

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@types/node": "^22.13.1",
3232
"@types/nunjucks": "^3.2.6",
3333
"auto-changelog": "^2.5.0",
34-
"boats": "^5.1.2",
34+
"boats": "^5.1.3",
3535
"prettier": "^3.5.1",
3636
"source-map-support": "^0.5.21",
3737
"typescript": "^5.4.5"

src/subcommands/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const getModelTasks = (options: ModelGenerationOptions): GenerationTask[]
119119
generate: !options['no-model'] && !options.type,
120120
});
121121

122-
const paginationRef = getRootRef('../pagination/model.yml', '#/components/PaginationModel', options.rootRef);
122+
const paginationRef = getRootRef('../pagination/model.yml', '#/components/schemas/PaginationModel', options.rootRef);
123123
if (options.type) {
124124
tasks.push({
125125
contents: () => getParam(options.name, options.type as Exclude<(typeof options)['type'], undefined>),

src/subcommands/path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const getPathTasks = (options: PathGenerationOptions): GenerationTask[] =
181181
const dashName = dashCase(singleModelName);
182182
const singularName = camelCase(singleModelName);
183183

184-
const paginationRef = getRootRef('../pagination/model.yml', '#/components/PaginationModel', options.rootRef);
184+
const paginationRef = getRootRef('../pagination/model.yml', '#/components/schemas/PaginationModel', options.rootRef);
185185

186186
if (options.list) {
187187
const filename = `src/paths/${normalizedBaseFilepath}/get.yml`;

test/e2e.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ describe('e2e.spec.ts', async () => {
333333
- "data"
334334
properties:
335335
meta:
336-
$ref: "#/components/Pagination"
336+
$ref: "#/components/schemas/Pagination"
337337
data:
338338
type: "array"
339339
items:
@@ -351,7 +351,7 @@ describe('e2e.spec.ts', async () => {
351351
- "data"
352352
properties:
353353
meta:
354-
$ref: "#/components/Pagination"
354+
$ref: "#/components/schemas/Pagination"
355355
data:
356356
type: "array"
357357
items:
@@ -582,7 +582,7 @@ describe('e2e.spec.ts', async () => {
582582
- "data"
583583
properties:
584584
meta:
585-
$ref: "#/components/PaginationModel"
585+
$ref: "#/components/schemas/PaginationModel"
586586
data:
587587
type: "array"
588588
items:
@@ -600,7 +600,7 @@ describe('e2e.spec.ts', async () => {
600600
- "data"
601601
properties:
602602
meta:
603-
$ref: "#/components/PaginationModel"
603+
$ref: "#/components/schemas/PaginationModel"
604604
data:
605605
type: "array"
606606
items:

0 commit comments

Comments
 (0)