@useoptic/openapi-utilities
Advanced tools
Comparing version 0.53.8 to 0.53.9
@@ -5,3 +5,3 @@ { | ||
"packageManager": "yarn@4.0.2", | ||
"version": "0.53.8", | ||
"version": "0.53.9", | ||
"main": "build/index.js", | ||
@@ -40,3 +40,3 @@ "types": "build/index.d.ts", | ||
"dependencies": { | ||
"@useoptic/json-pointer-helpers": "0.53.8", | ||
"@useoptic/json-pointer-helpers": "0.53.9", | ||
"ajv": "^8.6.0", | ||
@@ -43,0 +43,0 @@ "ajv-errors": "~3.0.0", |
@@ -60,4 +60,4 @@ import { jsonPointerHelpers } from '@useoptic/json-pointer-helpers'; | ||
: diff.after !== undefined | ||
? 'added' | ||
: 'removed'; | ||
? 'added' | ||
: 'removed'; | ||
} | ||
@@ -109,4 +109,4 @@ | ||
: allValues.every((v) => typeof v !== 'object') | ||
? (v: any) => String(v) | ||
: (_, i: number) => String(i); | ||
? (v: any) => String(v) | ||
: (_, i: number) => String(i); | ||
@@ -113,0 +113,0 @@ const beforeValuesById: Map<string, [JSONValue, number]> = new Map( |
@@ -249,4 +249,4 @@ import { jsonPointerHelpers } from '@useoptic/json-pointer-helpers'; | ||
: fact.type === 'field' && trailParts[0] === 'required' | ||
? fact.location.jsonPath | ||
: null; | ||
? fact.location.jsonPath | ||
: null; | ||
const location = getLocation(fact); | ||
@@ -436,6 +436,6 @@ | ||
: fact.type === 'request-query' | ||
? 'queryParameters' | ||
: fact.type === 'request-cookie' | ||
? 'cookieParameters' | ||
: 'pathParameters'; | ||
? 'queryParameters' | ||
: fact.type === 'request-cookie' | ||
? 'cookieParameters' | ||
: 'pathParameters'; | ||
const { pathPattern, method } = getLocation(fact); | ||
@@ -442,0 +442,0 @@ const endpointId = getEndpointId({ path: pathPattern, method }); |
@@ -34,72 +34,72 @@ import { OpenAPI, OpenAPIV3 } from 'openapi-types'; | ||
: T extends 'path' | ||
? { pathPattern: string } | ||
: T extends | ||
| 'operation' | ||
| 'request-header' | ||
| 'request-query' | ||
| 'request-cookie' | ||
| 'request-path' | ||
| 'requestBody' | ||
? { pathPattern: string; method: string } | ||
: T extends 'body' | ||
? | ||
| { | ||
location: 'response'; | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
contentType: string; | ||
} | ||
| { | ||
location: 'request'; | ||
pathPattern: string; | ||
method: string; | ||
contentType: string; | ||
} | ||
: T extends 'body-example' | 'body-examples' | ||
? | ||
| { | ||
location: 'response'; | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
| { | ||
location: 'request'; | ||
pathPattern: string; | ||
method: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
: T extends 'field' | ||
? | ||
| { | ||
location: 'response'; | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
| { | ||
location: 'request'; | ||
pathPattern: string; | ||
method: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
: T extends 'response' | ||
? { pathPattern: string; method: string; statusCode: string } | ||
: T extends 'response-header' | ||
? { | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
headerName: string; | ||
} | ||
: T extends 'component-schema-example' | ||
? {} | ||
: never; | ||
? { pathPattern: string } | ||
: T extends | ||
| 'operation' | ||
| 'request-header' | ||
| 'request-query' | ||
| 'request-cookie' | ||
| 'request-path' | ||
| 'requestBody' | ||
? { pathPattern: string; method: string } | ||
: T extends 'body' | ||
? | ||
| { | ||
location: 'response'; | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
contentType: string; | ||
} | ||
| { | ||
location: 'request'; | ||
pathPattern: string; | ||
method: string; | ||
contentType: string; | ||
} | ||
: T extends 'body-example' | 'body-examples' | ||
? | ||
| { | ||
location: 'response'; | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
| { | ||
location: 'request'; | ||
pathPattern: string; | ||
method: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
: T extends 'field' | ||
? | ||
| { | ||
location: 'response'; | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
| { | ||
location: 'request'; | ||
pathPattern: string; | ||
method: string; | ||
contentType: string; | ||
trail: string[]; | ||
} | ||
: T extends 'response' | ||
? { pathPattern: string; method: string; statusCode: string } | ||
: T extends 'response-header' | ||
? { | ||
pathPattern: string; | ||
method: string; | ||
statusCode: string; | ||
headerName: string; | ||
} | ||
: T extends 'component-schema-example' | ||
? {} | ||
: never; | ||
@@ -109,29 +109,29 @@ export type FactRawItem<T extends V3FactType> = T extends 'specification' | ||
: T extends 'path' | ||
? OpenAPIV3.PathItemObject | ||
: T extends 'operation' | ||
? OpenAPIV3.OperationObject | ||
: T extends 'request-header' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'request-query' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'request-cookie' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'request-path' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'body' | ||
? OpenAPIV3.MediaTypeObject | ||
: T extends 'requestBody' | ||
? OpenAPIV3.RequestBodyObject | ||
: T extends 'field' | ||
? OpenAPIV3.SchemaObject | ||
: T extends 'response' | ||
? OpenAPIV3.ResponseObject | ||
: T extends 'response-header' | ||
? OpenAPIV3.HeaderObject | ||
: T extends 'body-example' | ||
? NonNullable<OpenAPIV3.MediaTypeObject['example']> | ||
: T extends 'body-examples' | ||
? OpenAPIV3.ExampleObject | ||
: T extends 'component-schema-example' | ||
? OpenAPIV3.ExampleObject | ||
: never; | ||
? OpenAPIV3.PathItemObject | ||
: T extends 'operation' | ||
? OpenAPIV3.OperationObject | ||
: T extends 'request-header' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'request-query' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'request-cookie' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'request-path' | ||
? OpenAPIV3.ParameterObject | ||
: T extends 'body' | ||
? OpenAPIV3.MediaTypeObject | ||
: T extends 'requestBody' | ||
? OpenAPIV3.RequestBodyObject | ||
: T extends 'field' | ||
? OpenAPIV3.SchemaObject | ||
: T extends 'response' | ||
? OpenAPIV3.ResponseObject | ||
: T extends 'response-header' | ||
? OpenAPIV3.HeaderObject | ||
: T extends 'body-example' | ||
? NonNullable<OpenAPIV3.MediaTypeObject['example']> | ||
: T extends 'body-examples' | ||
? OpenAPIV3.ExampleObject | ||
: T extends 'component-schema-example' | ||
? OpenAPIV3.ExampleObject | ||
: never; |
@@ -7,4 +7,4 @@ export const SeverityTextOptions = ['info', 'warn', 'error'] as const; | ||
: sev === 'warn' | ||
? Severity.Warn | ||
: Severity.Error; | ||
? Severity.Warn | ||
: Severity.Error; | ||
} | ||
@@ -16,4 +16,4 @@ | ||
: sev === Severity.Warn | ||
? 'warn' | ||
: 'error'; | ||
? 'warn' | ||
: 'error'; | ||
} | ||
@@ -20,0 +20,0 @@ |
@@ -16,4 +16,4 @@ import { OpenAPIV3 } from 'openapi-types'; | ||
: diff.after | ||
? 'added' | ||
: 'removed'; | ||
? 'added' | ||
: 'removed'; | ||
}; | ||
@@ -227,8 +227,8 @@ | ||
: isResponseChange(segments) | ||
? getResponseChange(segments, changeType, spec) | ||
: isMethodParameterChange(segments) | ||
? getParameterChange(segments, changeType, spec) | ||
: isMethodExactChange(segments) | ||
? `${changeType}` | ||
: ``; | ||
? getResponseChange(segments, changeType, spec) | ||
: isMethodParameterChange(segments) | ||
? getParameterChange(segments, changeType, spec) | ||
: isMethodExactChange(segments) | ||
? `${changeType}` | ||
: ``; | ||
}; | ||
@@ -235,0 +235,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2048834
+ Added@useoptic/json-pointer-helpers@0.53.9(transitive)
- Removed@useoptic/json-pointer-helpers@0.53.8(transitive)