Skip to content

Commit

Permalink
Bump openapi3-ts from 4.0.4 to 4.1.2 (#40)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Chung <samc@seek.com.au>
  • Loading branch information
dependabot[bot] and samchungy authored Apr 25, 2023
1 parent b393f04 commit 2aca4e1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"test:watch": "skuba test --watch"
},
"dependencies": {
"openapi3-ts": "4.0.4",
"openapi3-ts": "4.1.2",
"yaml": "2.2.1"
},
"devDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions src/create/components.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { oas30, oas31 } from 'openapi3-ts';
import { ParameterLocation } from 'openapi3-ts/dist/mjs/oas31';
import { ZodRawShape, ZodType } from 'zod';

import {
Expand Down Expand Up @@ -49,7 +48,7 @@ export interface CompleteParameterComponent extends BaseParameterComponent {

export interface PartialParameterComponent extends BaseParameterComponent {
type: 'partial';
in: ParameterLocation;
in: oas31.ParameterLocation;
}

interface BaseParameterComponent {
Expand Down Expand Up @@ -225,7 +224,7 @@ const createParameters = (
components.parameters.set(schema, {
type: 'partial',
ref,
in: paramType as ParameterLocation,
in: paramType as oas31.ParameterLocation,
});
}
},
Expand Down
10 changes: 5 additions & 5 deletions src/create/schema/nullable.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { oas31 } from 'openapi3-ts';
import { oas30, oas31 } from 'openapi3-ts';
import { z } from 'zod';

import { extendZodWithOpenApi } from '../../extendZod';
Expand All @@ -14,7 +14,7 @@ extendZodWithOpenApi(z);
describe('createNullableSchema', () => {
describe('openapi 3.0.0', () => {
it('creates a simple nullable string schema', () => {
const expected: oas31.SchemaObject = {
const expected: oas30.SchemaObject = {
type: 'string',
nullable: true,
};
Expand All @@ -26,7 +26,7 @@ describe('createNullableSchema', () => {
});

it('creates an oneOf nullable schema for registered schemas', () => {
const expected: oas31.SchemaObject = {
const expected: oas30.SchemaObject = {
oneOf: [
{
$ref: '#/components/schemas/a',
Expand All @@ -45,7 +45,7 @@ describe('createNullableSchema', () => {
});

it('creates an anyOf nullable schema', () => {
const expected: oas31.SchemaObject = {
const expected: oas30.SchemaObject = {
anyOf: [
{
type: 'object',
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('createNullableSchema', () => {
});

it('creates a nullable allOf nullable schema', () => {
const expected: oas31.SchemaObject = {
const expected: oas30.SchemaObject = {
type: 'object',
properties: {
b: {
Expand Down
4 changes: 2 additions & 2 deletions src/create/schema/nullable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const createNullableSchema = (
type,
nullable: true,
...schema,
};
} as oas31.SchemaObject;
};

const mapNullType = (
Expand All @@ -74,5 +74,5 @@ const mapNullOf = (
if (satisfiesVersion(openapi, '3.1.0')) {
return [...ofSchema, { type: 'null' }];
}
return [...ofSchema, { nullable: true }];
return [...ofSchema, { nullable: true } as oas31.SchemaObject];
};
17 changes: 11 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5973,12 +5973,12 @@ openapi-sampler@^1.3.0:
"@types/json-schema" "^7.0.7"
json-pointer "0.6.2"

openapi3-ts@4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/openapi3-ts/-/openapi3-ts-4.0.4.tgz#65cebc1438ca1d933bfacfd2c15d6e2ee933901a"
integrity sha512-06//rVJH/6SUElqB8N/5thFTIzO/lT9nrJAXIHoicvKsDw13EIskmX74Ve+Uhgn95Jh8y7kDIU9G+zo9KWWXvA==
openapi3-ts@4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/openapi3-ts/-/openapi3-ts-4.1.2.tgz#f15cd4794e3a7c9b388fd45dfbefc78501f7043e"
integrity sha512-B7gOkwsYMZO7BZXwJzXCuVagym2xhqsrilVvV0dnq2Di4+iLUXKVX9gOK23ZqaAHZOwABXN0QTdW8QnkUTX6DA==
dependencies:
yaml "^2.2.1"
yaml "^2.2.2"

opener@^1.5.2:
version "1.5.2"
Expand Down Expand Up @@ -7959,7 +7959,7 @@ yaml-eslint-parser@^1.1.0:
lodash "^4.17.21"
yaml "^2.0.0"

yaml@2.2.1, yaml@^2.0.0, yaml@^2.2.1:
yaml@2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4"
integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==
Expand All @@ -7969,6 +7969,11 @@ yaml@^1.10.0:
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==

yaml@^2.0.0, yaml@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.2.tgz#ec551ef37326e6d42872dad1970300f8eb83a073"
integrity sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==

yargs-parser@^20.2.2, yargs-parser@^20.2.3:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
Expand Down

0 comments on commit 2aca4e1

Please sign in to comment.