I was trying to generate typescript client and encountered this in fbaInventory, I was using swaxios package for this. Interestingly with some other packages it works but I also tried to validate schema here but it still shows the same issues
stack: 'SyntaxError: Swagger schema validation failed. \n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/503\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/503/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/503\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/500\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/500/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/500\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/429\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/429/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/429\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/404\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/404/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/404\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/403\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/403/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/403\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/400\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/400/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/400\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/200\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/200/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/200\n' +
' \n' +
'JSON_OBJECT_VALIDATION_FAILED\n' +
' at validateSchema (C:\Users\bilal\AppData\Roaming\npm\node_modules\swaxios\node_modules\swagger-parser\lib\validators\schema.js:27:15)\n' +
' at SwaggerParser.validate (C:\Users\bilal\AppData\Roaming\npm\node_modules\swaxios\node_modules\swagger-parser\lib\index.js:155:7)\n' +
'\n' +
'z-schema validation error: JSON_OBJECT_VALIDATION_FAILED\n' +
' at ZSchema.getLastError (C:\Users\bilal\AppData\Roaming\npm\node_modules\swaxios\node_modules\z-schema\src\ZSchema.js:260:13)\n' +
' at validateSchema (C:\Users\bilal\AppData\Roaming\npm\node_modules\swaxios\node_modules\swagger-parser\lib\validators\schema.js:25:23)\n' +
' at SwaggerParser.validate (C:\Users\bilal\AppData\Roaming\npm\node_modules\swaxios\node_modules\swagger-parser\lib\index.js:155:7)',
message: 'Swagger schema validation failed. \n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/503\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/503/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/503\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/500\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/500/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/500\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/429\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/429/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/429\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/404\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/404/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/404\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/403\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/403/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/403\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/400\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/400/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/400\n' +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/200\n" +
" Data does not match any schemas from 'oneOf' at #/paths//fba/inventory/v1/summaries/get/responses/200/schema\n" +
' Expected type object but found type array at #/schema/properties/payload/properties/granularity/properties/x-docgen-enum-table-extension\n' +
' Additional properties not allowed: properties at #/schema\n' +
' Missing required property: $ref at #/paths//fba/inventory/v1/summaries/get/responses/200\n' +
' \n' +
'JSON_OBJECT_VALIDATION_FAILED',
details: [
{
code: 'ONE_OF_MISSING',
params: [],
message: "Data does not match any schemas from 'oneOf'",
path: [Array],
schemaId: undefined,
inner: [Array],
[Symbol(z-schema/schema)]: [Object],
[Symbol(z-schema/json)]: [Object]
},
{
code: 'ONE_OF_MISSING',
params: [],
message: "Data does not match any schemas from 'oneOf'",
path: [Array],
schemaId: undefined,
inner: [Array],
[Symbol(z-schema/schema)]: [Object],
[Symbol(z-schema/json)]: [Object]
},
{
code: 'ONE_OF_MISSING',
params: [],
message: "Data does not match any schemas from 'oneOf'",
path: [Array],
schemaId: undefined,
inner: [Array],
[Symbol(z-schema/schema)]: [Object],
[Symbol(z-schema/json)]: [Object]
},
{
code: 'ONE_OF_MISSING',
params: [],
message: "Data does not match any schemas from 'oneOf'",
path: [Array],
schemaId: undefined,
inner: [Array],
[Symbol(z-schema/schema)]: [Object],
[Symbol(z-schema/json)]: [Object]
},
{
code: 'ONE_OF_MISSING',
params: [],
message: "Data does not match any schemas from 'oneOf'",
path: [Array],
schemaId: undefined,
inner: [Array],
[Symbol(z-schema/schema)]: [Object],
[Symbol(z-schema/json)]: [Object]
},
{
code: 'ONE_OF_MISSING',
params: [],
message: "Data does not match any schemas from 'oneOf'",
path: [Array],
schemaId: undefined,
inner: [Array],
[Symbol(z-schema/schema)]: [Object],
[Symbol(z-schema/json)]: [Object]
},
{
code: 'ONE_OF_MISSING',
params: [],
message: "Data does not match any schemas from 'oneOf'",
path: [Array],
schemaId: undefined,
inner: [Array],
[Symbol(z-schema/schema)]: [Object],
[Symbol(z-schema/json)]: [Object]
}
],
toJSON: [Function: toJSON],
name: 'SyntaxError',
toString: [Function: toString]
}