-
Notifications
You must be signed in to change notification settings - Fork 16
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
Panic encountered during jsonschema validation #83
Comments
will investigate |
Signed-off-by: Dave Shanley <dave@quobix.com>
Signed-off-by: Dave Shanley <dave@quobix.com>
This should be resolved in |
I still encounter this exact panic on this spec |
This spec also caused the panic: openapi: 3.1.0
info:
title: Test
version: 0.1.0
security:
- apiKeyAuth: []
paths:
/anything/queryParams/form/obj:
get:
x-speakeasy-test: true
operationId: formQueryParamsObject
tags:
- parameters
parameters:
- name: objParamExploded
in: query
explode: true
schema:
$ref: "#/components/schemas/simpleObject"
required: true
- name: objParam
in: query
explode: false
schema:
$ref: "#/components/schemas/simpleObject"
responses:
"200":
description: OK
content:
application/json:
schema:
title: res
type: object
properties:
url:
type: string
example: http://localhost:35123/anything/queryParams/form/obj?any=any&bigint=8821239038968084&bigintStr=9223372036854775808&bool=true&boolOpt=true&date=2020-01-01&dateTime=2020-01-01T00%3A00%3A00.000001Z&decimal=3.141592653589793&decimalStr=3.14159265358979344719667586&enum=one&float32=1.1&int=1&int32=1&int32Enum=55&intEnum=2&num=1.1&objParam=any%2Cany%2Cbigint%2C8821239038968084%2CbigintStr%2C9223372036854775808%2Cbool%2Ctrue%2CboolOpt%2Ctrue%2Cdate%2C2020-01-01%2CdateTime%2C2020-01-01T00%3A00%3A00.000001Z%2Cdecimal%2C3.141592653589793%2CdecimalStr%2C3.14159265358979344719667586%2Cenum%2Cone%2Cfloat32%2C1.1%2Cint%2C1%2Cint32%2C1%2Cint32Enum%2C55%2CintEnum%2C2%2Cnum%2C1.1%2Cstr%2Ctest%2CstrOpt%2CtestOptional&str=test&strOpt=testOptional
x-speakeasy-test-internal-directives:
- sortQueryParameters: {}
- sortSerializedMaps:
{ "regex": "objParam=(.*?)&", "delim": "%2C" }
args:
type: object
properties:
str:
type: string
example: "test"
bool:
type: string
example: "true"
int:
type: string
example: "1"
int32:
type: string
example: "1"
num:
type: string
example: "1.1"
float32:
type: string
example: "1.1"
enum:
type: string
example: "one"
any:
type: string
example: "any"
date:
type: string
example: "2020-01-01"
dateTime:
type: string
example: "2020-01-01T00:00:00.000001Z"
boolOpt:
type: string
example: "true"
strOpt:
type: string
example: "testOptional"
intOptNull:
type: string
numOptNull:
type: string
objParam:
type: string
example: "any,any,bigint,8821239038968084,bigintStr,9223372036854775808,bool,true,boolOpt,true,date,2020-01-01,dateTime,2020-01-01T00:00:00.000001Z,decimal,3.141592653589793,decimalStr,3.14159265358979344719667586,enum,one,float32,1.1,int,1,int32,1,int32Enum,55,intEnum,2,num,1.1,str,test,strOpt,testOptional"
x-speakeasy-test-internal-directives:
- sortSerializedMaps:
{ "regex": "(.*)", "delim": "," }
intEnum:
type: string
example: "2"
int32Enum:
type: string
example: "55"
bigint:
type: string
example: "8821239038968084"
bigintStr:
type: string
example: "9223372036854775808"
decimal:
type: string
example: "3.141592653589793"
decimalStr:
type: string
example: "3.14159265358979344719667586"
required:
- str
- bool
- int
- int32
- num
- float32
- enum
- any
- date
- dateTime
- objParam
- intEnum
- int32Enum
required:
- url
- args
components:
schemas:
simpleObject:
description: "A simple object that uses all our supported primitive types and enums and has optional properties."
externalDocs:
description: "A link to the external docs."
url: "https://docs.speakeasyapi.dev"
type: object
properties:
str:
type: string
description: "A string property."
example: "test"
bool:
type: boolean
description: "A boolean property."
example: true
int:
type: integer
description: "An integer property."
example: 1
int32:
type: integer
format: int32
description: "An int32 property."
example: 1
num:
type: number
description: "A number property."
example: 1.1
float32:
type: number
format: float
description: "A float32 property."
example: 1.1
enum:
$ref: "#/components/schemas/enum"
date:
type: string
format: date
description: "A date property."
example: "2020-01-01"
dateTime:
type: string
format: date-time
description: "A date-time property."
example: "2020-01-01T00:00:00.000001Z"
any:
description: "An any property."
example: "any"
strOpt:
type: string
description: "An optional string property."
example: "testOptional"
boolOpt:
type: boolean
description: "An optional boolean property."
example: true
intOptNull:
type: integer
description: "An optional integer property will be null for tests."
numOptNull:
type: number
description: "An optional number property will be null for tests."
intEnum:
type: integer
description: "An integer enum property."
enum:
- 1
- 2
- 3
example: 2
x-speakeasy-enums:
- First
- Second
- Third
int32Enum:
type: integer
format: int32
description: "An int32 enum property."
enum:
- 55
- 69
- 181
example: 55
bigint:
type: integer
format: bigint
example: 8821239038968084
bigintStr:
type: string
format: bigint
example: "9223372036854775808"
decimal:
type: number
format: decimal
example: 3.141592653589793
decimalStr:
type: string
format: decimal
example: "3.14159265358979344719667586"
required:
- str
- bool
- int
- int32
- num
- float32
- enum
- date
- dateTime
- any
- intEnum
- int32Enum
enum:
type: string
description: "A string based enum"
enum:
- "one"
- "two"
- "three"
- "four_and_more"
example: "one"
securitySchemes:
apiKeyAuth:
type: apiKey
in: header
name: Authorization
description: Authenticate using an API Key generated via our platform. using URL: |
Another simpler spec that causes the issue: openapi: 3.1.0
info:
title: Test
version: 0.1.0
security:
- apiKeyAuth: []
paths:
/anything/headers/obj:
get:
x-speakeasy-test: true
operationId: headerParamsObject
tags:
- parameters
parameters:
- name: X-Header-Obj
in: header
schema:
$ref: "#/components/schemas/simpleObject"
required: true
- name: X-Header-Obj-Explode
in: header
explode: true
schema:
$ref: "#/components/schemas/simpleObject"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
title: res
type: object
properties:
headers:
type: object
properties:
X-Header-Obj:
type: string
example: any,any,bigint,8821239038968084,bigintStr,9223372036854775808,bool,true,boolOpt,true,date,2020-01-01,dateTime,2020-01-01T00:00:00.000001Z,decimal,3.141592653589793,decimalStr,3.14159265358979344719667586,enum,one,float32,1.1,int,1,int32,1,int32Enum,55,intEnum,2,num,1.1,str,test,strOpt,testOptional
x-speakeasy-test-internal-directives:
- sortSerializedMaps:
{ "regex": "(.*)", "delim": "," }
X-Header-Obj-Explode:
type: string
example: any=any,bigint=8821239038968084,bigintStr=9223372036854775808,bool=true,boolOpt=true,date=2020-01-01,dateTime=2020-01-01T00:00:00.000001Z,decimal=3.141592653589793,decimalStr=3.14159265358979344719667586,enum=one,float32=1.1,int=1,int32=1,int32Enum=55,intEnum=2,num=1.1,str=test,strOpt=testOptional
x-speakeasy-test-internal-directives:
- sortSerializedMaps:
{ "regex": "(.*)", "delim": "," }
required:
- X-Header-Obj
- X-Header-Obj-Explode
required:
- headers
components:
schemas:
simpleObject:
description: "A simple object that uses all our supported primitive types and enums and has optional properties."
externalDocs:
description: "A link to the external docs."
url: "https://docs.speakeasyapi.dev"
type: object
properties:
str:
type: string
description: "A string property."
example: "test"
bool:
type: boolean
description: "A boolean property."
example: true
int:
type: integer
description: "An integer property."
example: 1
int32:
type: integer
format: int32
description: "An int32 property."
example: 1
num:
type: number
description: "A number property."
example: 1.1
float32:
type: number
format: float
description: "A float32 property."
example: 1.1
enum:
$ref: "#/components/schemas/enum"
date:
type: string
format: date
description: "A date property."
example: "2020-01-01"
dateTime:
type: string
format: date-time
description: "A date-time property."
example: "2020-01-01T00:00:00.000001Z"
any:
description: "An any property."
example: "any"
strOpt:
type: string
description: "An optional string property."
example: "testOptional"
boolOpt:
type: boolean
description: "An optional boolean property."
example: true
intOptNull:
type: integer
description: "An optional integer property will be null for tests."
numOptNull:
type: number
description: "An optional number property will be null for tests."
intEnum:
type: integer
description: "An integer enum property."
enum:
- 1
- 2
- 3
example: 2
x-speakeasy-enums:
- First
- Second
- Third
int32Enum:
type: integer
format: int32
description: "An int32 enum property."
enum:
- 55
- 69
- 181
example: 55
bigint:
type: integer
format: bigint
example: 8821239038968084
bigintStr:
type: string
format: bigint
example: "9223372036854775808"
decimal:
type: number
format: decimal
example: 3.141592653589793
decimalStr:
type: string
format: decimal
example: "3.14159265358979344719667586"
required:
- str
- bool
- int
- int32
- num
- float32
- enum
- date
- dateTime
- any
- intEnum
- int32Enum
enum:
type: string
description: "A string based enum"
enum:
- "one"
- "two"
- "three"
- "four_and_more"
example: "one"
securitySchemes:
apiKeyAuth:
type: apiKey
in: header
name: Authorization
description: Authenticate using an API Key generated via our platform. |
The theme seems to be it struggles with object schemas |
Will re-investigate. |
mocking upgraded upstream in libopenapi
mocking upgraded upstream in libopenapi
This is resolved in |
This spec:
when a request is sent causes the below panic:
The text was updated successfully, but these errors were encountered: