Skip to content

chore(deps): upgrading @apidevtools/json-scheam-ref-parser #988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 18 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"test": "echo 'Please run tests from the root!' && exit 1"
},
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^13.0.5",
"@apidevtools/json-schema-ref-parser": "^14.1.1",
"@readme/better-ajv-errors": "^2.3.2",
"@readme/openapi-schemas": "^3.1.0",
"@types/json-schema": "^7.0.15",
Expand Down
46 changes: 46 additions & 0 deletions packages/parser/test/specs/bundling/bundling.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { describe, it, expect } from 'vitest';

import { bundle } from '../../../src/index.js';
import { relativePath } from '../../utils.js';

describe('bundle', () => {
it('should bundle successfully', async () => {
const api = await bundle(relativePath('specs/bundling/nullish-example.yaml'));

expect(api).toStrictEqual({
openapi: '3.0.3',
info: {
version: '1.0',
title: 'API definition with a nullish example property',
},
paths: {
'/anything': {
get: {
responses: {
'200': {
description: 'OK',
content: {
'application/json': {
schema: {
type: 'array',
items: { $ref: '#/components/schemas/User-Information' },
},
example: { data: { first: null, last: 'lastname' } },
},
},
},
},
},
},
},
components: {
schemas: {
'User-Information': {
type: 'object',
properties: { first: { type: 'boolean' }, last: { type: 'boolean' } },
},
},
},
});
});
});
29 changes: 29 additions & 0 deletions packages/parser/test/specs/bundling/nullish-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
openapi: 3.0.3
info:
version: '1.0'
title: API definition with a nullish example property
paths:
/anything:
get:
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
'$ref': '#/components/schemas/User-Information'
example:
data:
first:
last: lastname
components:
schemas:
User-Information:
type: object
properties:
first:
type: boolean
last:
type: boolean