diff --git a/packages/openapi-to-graphql/lib/index.js b/packages/openapi-to-graphql/lib/index.js index 638f6ba3..1fd0613e 100644 --- a/packages/openapi-to-graphql/lib/index.js +++ b/packages/openapi-to-graphql/lib/index.js @@ -51,7 +51,6 @@ const DEFAULT_OPTIONS = { viewer: true, sendOAuthTokenInQuery: false, // Validation options - oasValidatorOptions: {}, swagger2OpenAPIOptions: {}, // Logging options provideErrorExtensions: true, @@ -67,7 +66,7 @@ function createGraphQLSchema(spec, options) { if (Array.isArray(spec)) { // Convert all non-OAS 3 into OAS 3 Promise.all(spec.map((ele) => { - return Oas3Tools.getValidOAS3(ele, internalOptions.oasValidatorOptions, internalOptions.swagger2OpenAPIOptions); + return Oas3Tools.getValidOAS3(ele, internalOptions.swagger2OpenAPIOptions); })) .then((oass) => { resolve(translateOpenAPIToGraphQL(oass, internalOptions)); @@ -82,7 +81,7 @@ function createGraphQLSchema(spec, options) { * If the spec is OAS 2.0, attempt to translate it into 3, then try to * translate the spec into a GraphQL schema */ - Oas3Tools.getValidOAS3(spec, internalOptions.oasValidatorOptions, internalOptions.swagger2OpenAPIOptions) + Oas3Tools.getValidOAS3(spec, internalOptions.swagger2OpenAPIOptions) .then((oas) => { resolve(translateOpenAPIToGraphQL([oas], internalOptions)); }) @@ -104,7 +103,7 @@ headers, qs, requestOptions, connectOptions, baseUrl, customResolvers, customSub // Authentication options viewer, tokenJSONpath, sendOAuthTokenInQuery, // Validation options -oasValidatorOptions, swagger2OpenAPIOptions, +swagger2OpenAPIOptions, // Logging options provideErrorExtensions, equivalentToMessages }) { const options = { @@ -134,7 +133,6 @@ provideErrorExtensions, equivalentToMessages }) { tokenJSONpath, sendOAuthTokenInQuery, // Validation options - oasValidatorOptions, swagger2OpenAPIOptions, // Logging options provideErrorExtensions, diff --git a/packages/openapi-to-graphql/lib/index.js.map b/packages/openapi-to-graphql/lib/index.js.map index fcae82b2..7dfdd87e 100644 --- a/packages/openapi-to-graphql/lib/index.js.map +++ b/packages/openapi-to-graph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,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;KACH;AACH,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CACxB,OAAkD,EAClD,IAAiD;IAEjD,mCAAmC;IACnC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACnC,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAA;IACvB,CAAC,CAAC,CAAA;IAEF,+BAA+B;IAC/B,IAAI,GAAG,CACL,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAC7B,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAA;IACxC,CAAC,CAAC,CACH,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAClB,qBAAa,CAAC;YACZ,cAAc,EAAE,uBAAe,CAAC,uBAAuB;YACvD,OAAO,EAAE,sCAAsC,KAAK,GAAG;YACvD,IAAI;YACJ,GAAG,EAAE,cAAc;SACpB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,wBAAwB;IACxB,6BAA6B,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;IAE5D,oCAAoC;IACpC,6BAA6B,CAAC,OAAO,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAA;AAC1E,CAAC;AAED,6CAAmD;AAA1C,wGAAA,SAAS,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAC5B,2CAAsD;AAA7C,+GAAA,oBAAoB,OAAA"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/oas_3_tools.d.ts b/packages/openapi-to-graphql/lib/oas_3_tools.d.ts index e0905b7a..934cc1f7 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.d.ts +++ b/packages/openapi-to-graphql/lib/oas_3_tools.d.ts @@ -52,7 +52,7 @@ export declare function methodToHttpMethod(method: string): HTTP_METHODS; * Resolves on a validated OAS 3 for the given spec (OAS 2 or OAS 3), or rejects * if errors occur. */ -export declare function getValidOAS3(spec: Oas2 | Oas3, oasValidatorOptions: object, swagger2OpenAPIOptions: object): Promise; +export declare function getValidOAS3(spec: Oas2 | Oas3, swagger2OpenAPIOptions: object): Promise; /** * Counts the number of operations in an OAS. */ diff --git a/packages/openapi-to-graphql/lib/oas_3_tools.js b/packages/openapi-to-graphql/lib/oas_3_tools.js index 02c7cdfd..658831f3 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.js +++ b/packages/openapi-to-graphql/lib/oas_3_tools.js @@ -8,7 +8,7 @@ exports.generateOperationId = exports.uncapitalize = exports.capitalize = export const operation_1 = require("./types/operation"); // Imports: const Swagger2OpenAPI = require("swagger2openapi"); -const OASValidator = require("oas-validator"); +const spectral_1 = require("@stoplight/spectral"); const debug_1 = require("debug"); const utils_1 = require("./utils"); const jsonptr = require("json-ptr"); @@ -62,7 +62,7 @@ exports.methodToHttpMethod = methodToHttpMethod; * Resolves on a validated OAS 3 for the given spec (OAS 2 or OAS 3), or rejects * if errors occur. */ -function getValidOAS3(spec, oasValidatorOptions, swagger2OpenAPIOptions) { +function getValidOAS3(spec, swagger2OpenAPIOptions) { return new Promise((resolve, reject) => { // CASE: translate if (typeof spec.swagger === 'string' && @@ -76,8 +76,19 @@ function getValidOAS3(spec, oasValidatorOptions, swagger2OpenAPIOptions) { else if (typeof spec.openapi === 'string' && /^3/.test(spec.openapi)) { preprocessingLog(`Received OpenAPI Specification - going to validate...`); - OASValidator.validate(spec, oasValidatorOptions) - .then(() => resolve(spec)) + const validator = new spectral_1.Spectral(); + validator.registerFormat("oas3", spectral_1.isOpenApiv3); + validator + .loadRuleset("spectral:oas") + .then(() => validator.run(spec)) + .then((results) => { + for (const result of results) { + if (result.severity < 1) { + return reject(`Invalid OpenAPI Specification '${spec.info.title}'. [${result.path.join('.')}] ${result.message}`); + } + } + resolve(spec); + }) .catch((error) => reject(`Could not validate OpenAPI Specification '${spec.info.title}'. ${error.message}`)); } else { diff --git a/packages/openapi-to-graphql/lib/oas_3_tools.js.map b/packages/openapi-to-graphql/lib/oas_3_tools.js.map index f167a712..b6197ce4 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.js.map +++ b/packages/openapi-to-graphql/lib/oas_3_tools.js.map @@ -1 +1 @@ -{"version":3,"file":"oas_3_tools.js","sourceRoot":"","sources":["../src/oas_3_tools.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAQhE,iDAAgE;AAwBhE,WAAW;AACX,mDAAkD;AAClD,8CAA6C;AAC7C,iCAAyB;AACzB,mCAAwD;AACxD,oCAAmC;AACnC,uCAAsC;AA+BtC,MAAM,OAAO,GAAG,eAAK,CAAC,MAAM,CAAC,CAAA;AAC7B,MAAM,gBAAgB,GAAG,eAAK,CAAC,eAAe,CAAC,CAAA;AAE/C,MAAM,cAAc,GAAG,eAAK,CAAC,aAAa,CAAC,CAAA;AAE3C,gBAAgB;AAChB,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,2BAAa,CAAA;IACb,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;IACrB,6BAAe,CAAA;AACjB,CAAC,EARW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAQvB;AAEY,QAAA,iBAAiB,GAAG,eAAe,CAAA;AAEhD,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,0DAAgC,CAAA;IAChC,4DAAkC,CAAA;IAClC,gEAAsC,CAAA;AACxC,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,MAAc;IAC/C,QAAQ,MAAM,CAAC,WAAW,EAAE,EAAE;QAC5B,KAAK,KAAK;YACR,OAAO,YAAY,CAAC,GAAG,CAAA;QAEzB,KAAK,KAAK;YACR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C,CAAA;AACjE,CAAC;AAFD,oCAEC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,MAAc,EACd,IAAY,EACZ,KAAc;IAEd,IAAI,KAAK,EAAE;QACT,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAA;KAClD;SAAM;QACL,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAA;KACzC;AACH,CAAC;AAVD,sDAUC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnD,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnD,CAAC;AAFD,oCAEC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CACjC,MAAoB,EACpB,IAAY;IAEZ,OAAO,QAAQ,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;AAC3D,CAAC;AALD,kDAKC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/types/options.d.ts b/packages/openapi-to-graphql/lib/types/options.d.ts index 61c98bc6..a75df21b 100644 --- a/packages/openapi-to-graphql/lib/types/options.d.ts +++ b/packages/openapi-to-graphql/lib/types/options.d.ts @@ -240,14 +240,6 @@ export declare type InternalOptions = { * header. */ sendOAuthTokenInQuery: boolean; - /** - * We use the oas-validator library to validate Swaggers/OASs. - * - * We expose the options so that users can have more control over validation. - * - * Based on: https://github.com/Mermade/oas-kit/blob/master/docs/options.md - */ - oasValidatorOptions: object; /** * We use the swagger2graphql library to translate Swaggers to OASs. * diff --git a/packages/openapi-to-graphql/package.json b/packages/openapi-to-graphql/package.json index 707ae512..6b640ea5 100644 --- a/packages/openapi-to-graphql/package.json +++ b/packages/openapi-to-graphql/package.json @@ -66,6 +66,7 @@ "testRegex": "/test/.*\\.test\\.(ts|tsx|js)$" }, "dependencies": { + "@stoplight/spectral": "^5.9.1", "debug": "^4.2.0", "deep-equal": "^2.0.1", "form-urlencoded": "^4.2.1", @@ -73,7 +74,6 @@ "graphql-type-json": "^0.3.2", "json-ptr": "^1.3.1", "jsonpath-plus": "^4.0.0", - "oas-validator": "^5.0.2", "pluralize": "^8.0.0", "request": "^2.88.0", "swagger2openapi": "^7.0.2" diff --git a/packages/openapi-to-graphql/src/index.ts b/packages/openapi-to-graphql/src/index.ts index a3b72309..bbb9fcd6 100644 --- a/packages/openapi-to-graphql/src/index.ts +++ b/packages/openapi-to-graphql/src/index.ts @@ -116,7 +116,6 @@ const DEFAULT_OPTIONS: InternalOptions = { sendOAuthTokenInQuery: false, // Validation options - oasValidatorOptions: {}, swagger2OpenAPIOptions: {}, // Logging options @@ -144,7 +143,6 @@ export function createGraphQLSchema( spec.map((ele) => { return Oas3Tools.getValidOAS3( ele, - internalOptions.oasValidatorOptions, internalOptions.swagger2OpenAPIOptions ) }) @@ -161,11 +159,7 @@ export function createGraphQLSchema( * If the spec is OAS 2.0, attempt to translate it into 3, then try to * translate the spec into a GraphQL schema */ - Oas3Tools.getValidOAS3( - spec, - internalOptions.oasValidatorOptions, - internalOptions.swagger2OpenAPIOptions - ) + Oas3Tools.getValidOAS3(spec, internalOptions.swagger2OpenAPIOptions) .then((oas) => { resolve(translateOpenAPIToGraphQL([oas], internalOptions)) }) @@ -212,7 +206,6 @@ function translateOpenAPIToGraphQL( sendOAuthTokenInQuery, // Validation options - oasValidatorOptions, swagger2OpenAPIOptions, // Logging options @@ -251,7 +244,6 @@ function translateOpenAPIToGraphQL( sendOAuthTokenInQuery, // Validation options - oasValidatorOptions, swagger2OpenAPIOptions, // Logging options diff --git a/packages/openapi-to-graphql/src/oas_3_tools.ts b/packages/openapi-to-graphql/src/oas_3_tools.ts index 877be471..61e3038e 100644 --- a/packages/openapi-to-graphql/src/oas_3_tools.ts +++ b/packages/openapi-to-graphql/src/oas_3_tools.ts @@ -35,7 +35,11 @@ import { InternalOptions } from './types/options' // Imports: import * as Swagger2OpenAPI from 'swagger2openapi' -import * as OASValidator from 'oas-validator' +import { + Spectral as OASValidator, + isOpenApiv2, + isOpenApiv3 +} from '@stoplight/spectral' import debug from 'debug' import { handleWarning, MitigationTypes } from './utils' import * as jsonptr from 'json-ptr' @@ -131,7 +135,6 @@ export function methodToHttpMethod(method: string): HTTP_METHODS { */ export function getValidOAS3( spec: Oas2 | Oas3, - oasValidatorOptions: object, swagger2OpenAPIOptions: object ): Promise { return new Promise((resolve, reject) => { @@ -161,8 +164,25 @@ export function getValidOAS3( ) { preprocessingLog(`Received OpenAPI Specification - going to validate...`) - OASValidator.validate(spec, oasValidatorOptions) - .then(() => resolve(spec as Oas3)) + const validator = new OASValidator() + validator.registerFormat('oas3', isOpenApiv3) + + validator + .loadRuleset('spectral:oas') + .then(() => validator.run(spec)) + .then((results) => { + for (const result of results) { + if (result.severity < 1) { + return reject( + `Invalid OpenAPI Specification '${ + (spec as Oas3).info.title + }'. [${result.path.join('.')}] ${result.message}` + ) + } + } + + resolve(spec as Oas3) + }) .catch((error) => reject( `Could not validate OpenAPI Specification '${ @@ -419,7 +439,7 @@ export function getSchemaTargetGraphQLType( oas: Oas3 ): TargetGraphQLType | null { let schema: SchemaObject - if ("$ref" in schemaOrRef && typeof schemaOrRef.$ref === 'string') { + if ('$ref' in schemaOrRef && typeof schemaOrRef.$ref === 'string') { schema = resolveRef(schemaOrRef.$ref, oas) } else { schema = schemaOrRef as SchemaObject @@ -529,7 +549,10 @@ function hasNestedOneOfUsage(schema: SchemaObject, oas: Oas3): boolean { Array.isArray(schema.oneOf) && schema.oneOf.some((memberSchemaOrRef) => { let memberSchema: SchemaObject - if ("$ref" in memberSchemaOrRef && typeof memberSchemaOrRef.$ref === 'string') { + if ( + '$ref' in memberSchemaOrRef && + typeof memberSchemaOrRef.$ref === 'string' + ) { memberSchema = resolveRef(memberSchemaOrRef.$ref, oas) } else { memberSchema = memberSchemaOrRef as SchemaObject @@ -560,7 +583,10 @@ function hasNestedAnyOfUsage(schema: SchemaObject, oas: Oas3): boolean { schema.anyOf.some((memberSchemaOrRef) => { let memberSchema: SchemaObject - if ("$ref" in memberSchemaOrRef && typeof memberSchemaOrRef.$ref === 'string') { + if ( + '$ref' in memberSchemaOrRef && + typeof memberSchemaOrRef.$ref === 'string' + ) { memberSchema = resolveRef(memberSchemaOrRef.$ref, oas) } else { memberSchema = memberSchemaOrRef as SchemaObject @@ -809,11 +835,11 @@ export function getRequestSchemaAndNames( requestBodyObjectOrRef !== null ) { // Resolve reference if applicable. Make sure we have a RequestBodyObject: - if ("$ref" in requestBodyObjectOrRef && typeof requestBodyObjectOrRef.$ref === 'string') { - requestBodyObject = resolveRef( - requestBodyObjectOrRef.$ref, - oas - ) + if ( + '$ref' in requestBodyObjectOrRef && + typeof requestBodyObjectOrRef.$ref === 'string' + ) { + requestBodyObject = resolveRef(requestBodyObjectOrRef.$ref, oas) } else { requestBodyObject = requestBodyObjectOrRef as RequestBodyObject } @@ -859,14 +885,11 @@ export function getRequestSchemaAndNames( ) { // Resolve payload schema reference if applicable if ( - "$ref" in payloadSchemaOrRef && + '$ref' in payloadSchemaOrRef && typeof payloadSchemaOrRef.$ref === 'string' ) { fromRef = payloadSchemaOrRef.$ref.split('/').pop() - payloadSchema = resolveRef( - payloadSchemaOrRef.$ref, - oas - ) + payloadSchema = resolveRef(payloadSchemaOrRef.$ref, oas) } else { payloadSchema = payloadSchemaOrRef as SchemaObject } @@ -946,11 +969,11 @@ export function getResponseSchemaAndNames( // Get response object const responseObjectOrRef = operation?.responses?.[statusCode] if (typeof responseObjectOrRef === 'object' && responseObjectOrRef !== null) { - if ("$ref" in responseObjectOrRef && typeof responseObjectOrRef.$ref === 'string') { - responseObject = resolveRef( - responseObjectOrRef.$ref, - oas - ) + if ( + '$ref' in responseObjectOrRef && + typeof responseObjectOrRef.$ref === 'string' + ) { + responseObject = resolveRef(responseObjectOrRef.$ref, oas) } else { responseObject = responseObjectOrRef as ResponseObject } @@ -984,14 +1007,11 @@ export function getResponseSchemaAndNames( responseObject?.content?.[responseContentType]?.schema // Resolve response schema reference if applicable if ( - "$ref" in responseSchemaOrRef && + '$ref' in responseSchemaOrRef && typeof responseSchemaOrRef.$ref === 'string' ) { fromRef = responseSchemaOrRef.$ref.split('/').pop() - responseSchema = resolveRef( - responseSchemaOrRef.$ref, - oas - ) + responseSchema = resolveRef(responseSchemaOrRef.$ref, oas) } else { responseSchema = responseSchemaOrRef as SchemaObject } @@ -1121,11 +1141,11 @@ export function getLinks( const responseObjectOrRef = responses[statusCode] let response: ResponseObject - if ("$ref" in responseObjectOrRef && typeof responseObjectOrRef.$ref === 'string') { - response = resolveRef( - responseObjectOrRef.$ref, - oas - ) + if ( + '$ref' in responseObjectOrRef && + typeof responseObjectOrRef.$ref === 'string' + ) { + response = resolveRef(responseObjectOrRef.$ref, oas) } else { response = responseObjectOrRef as ResponseObject } @@ -1136,7 +1156,10 @@ export function getLinks( const linkObjectOrRef = epLinks[linkKey] let link: LinkObject - if ("$ref" in linkObjectOrRef && typeof linkObjectOrRef.$ref === 'string') { + if ( + '$ref' in linkObjectOrRef && + typeof linkObjectOrRef.$ref === 'string' + ) { link = resolveRef(linkObjectOrRef.$ref, oas) } else { link = linkObjectOrRef as LinkObject @@ -1173,17 +1196,15 @@ export function getParameters( // First, consider parameters in Path Item Object: const pathParams = pathItem.parameters if (Array.isArray(pathParams)) { - const pathItemParameters: ParameterObject[] = pathParams.map( - (p) => { - if ("$ref" in p && typeof p.$ref === 'string') { - // Here we know we have a parameter object: - return resolveRef(p.$ref, oas) as ParameterObject - } else { - // Here we know we have a parameter object: - return p as ParameterObject - } + const pathItemParameters: ParameterObject[] = pathParams.map((p) => { + if ('$ref' in p && typeof p.$ref === 'string') { + // Here we know we have a parameter object: + return resolveRef(p.$ref, oas) as ParameterObject + } else { + // Here we know we have a parameter object: + return p as ParameterObject } - ) + }) parameters = parameters.concat(pathItemParameters) } @@ -1192,7 +1213,7 @@ export function getParameters( if (Array.isArray(opObjectParameters)) { const operationParameters: ParameterObject[] = opObjectParameters.map( (p) => { - if ("$ref" in p && typeof p.$ref === 'string') { + if ('$ref' in p && typeof p.$ref === 'string') { // Here we know we have a parameter object: return resolveRef(p.$ref, oas) } else { @@ -1262,12 +1283,12 @@ export function getSecuritySchemes( const securitySchemeOrRef = oas.components.securitySchemes[schemeKey] // Ensure we have actual SecuritySchemeObject: - if ("$ref" in securitySchemeOrRef && typeof securitySchemeOrRef.$ref === 'string') { + if ( + '$ref' in securitySchemeOrRef && + typeof securitySchemeOrRef.$ref === 'string' + ) { // Result of resolution will be SecuritySchemeObject: - securitySchemes[schemeKey] = resolveRef( - securitySchemeOrRef.$ref, - oas - ) + securitySchemes[schemeKey] = resolveRef(securitySchemeOrRef.$ref, oas) } else { // We already have a SecuritySchemeObject: securitySchemes[schemeKey] = securitySchemeOrRef as SecuritySchemeObject diff --git a/packages/openapi-to-graphql/src/types/options.ts b/packages/openapi-to-graphql/src/types/options.ts index b6c53044..f58b2cae 100644 --- a/packages/openapi-to-graphql/src/types/options.ts +++ b/packages/openapi-to-graphql/src/types/options.ts @@ -298,15 +298,6 @@ export type InternalOptions = { // Validation options - /** - * We use the oas-validator library to validate Swaggers/OASs. - * - * We expose the options so that users can have more control over validation. - * - * Based on: https://github.com/Mermade/oas-kit/blob/master/docs/options.md - */ - oasValidatorOptions: object - /** * We use the swagger2graphql library to translate Swaggers to OASs. * diff --git a/packages/openapi-to-graphql/test/fixtures/example_oas.json b/packages/openapi-to-graphql/test/fixtures/example_oas.json index ff07200c..b89ba376 100644 --- a/packages/openapi-to-graphql/test/fixtures/example_oas.json +++ b/packages/openapi-to-graphql/test/fixtures/example_oas.json @@ -1481,8 +1481,7 @@ }, "links": { "Author": { - "$ref": "ThisIsHereAndFormattedThisWayBecauseOfAnIssueWithADependency", - "operationRef": "Example API 3#/paths/~1authors~1{authorId}/get", + "operationRef": "./example_oas3.json#/paths/~1authors~1{authorId}/get", "parameters": { "authorId": "$request.path.username" }, @@ -1575,7 +1574,6 @@ } }, "ReviewsWithOperationRef": { - "$ref": "ThisIsHereAndFormattedThisWayBecauseOfAnIssueWithADependency", "operationRef": "#/paths/~1products~1{id}~1reviews/get", "parameters": { "id": "$request.path.product-id", diff --git a/packages/openapi-to-graphql/test/fixtures/example_oas3.json b/packages/openapi-to-graphql/test/fixtures/example_oas3.json index 48a41268..866d7899 100644 --- a/packages/openapi-to-graphql/test/fixtures/example_oas3.json +++ b/packages/openapi-to-graphql/test/fixtures/example_oas3.json @@ -216,8 +216,7 @@ }, "links": { "Employee": { - "$ref": "ThisIsHereAndFormattedThisWayBecauseOfAnIssueWithADependency", - "operationRef": "Example API#/paths/~1users~1{username}/get", + "operationRef": "./example_oas.json#/paths/~1users~1{username}/get", "parameters": { "username": "$request.path.authorId" }, diff --git a/packages/openapi-to-graphql/test/oas_3_tools.test.ts b/packages/openapi-to-graphql/test/oas_3_tools.test.ts index 7a8195a5..c001a17d 100644 --- a/packages/openapi-to-graphql/test/oas_3_tools.test.ts +++ b/packages/openapi-to-graphql/test/oas_3_tools.test.ts @@ -216,3 +216,41 @@ test('Handle encoded JSON pointer references', () => { } } }) + +test('Validate 3.1.0 openapi', async () => { + const oas = { + openapi: '3.1.0', + info: { + title: 'test', + version: '0.0.1', + license: { + identifier: 'UNLICENSED', // This is 3.1.0+ only + name: 'test' + } + }, + paths: {} + } + + const result = await Oas3Tools.getValidOAS3(oas, {}) + + expect(result.openapi).toBe('3.1.0') +}) + +test('Invalid 3.0.0 openapi', async () => { + const oas = { + openapi: '3.0.0', + info: { + title: 'test', + version: '0.0.1', + license: { + identifier: 'UNLICENSED', // This is invalid + name: 'test' + } + }, + paths: {} + } + + await expect(Oas3Tools.getValidOAS3(oas, {})).rejects.toMatch( + 'info.license.identifier' + ) +})