kin-openapi
kin-openapi copied to clipboard
Validation of 3.0.3 schema fails
Validation fails for this file but is fine in https://oas-validation.com/.
bad data in "#/components/parameters/soc" (expecting ref to schema object)
Parameters:
soc:
name: soc
description: SOC in %
in: path
required: true
schema:
$ref: "#/components/schemas/Soc"
Schemas:
Soc:
description: SOC in %
type: number
example: 60
minimum: 0
maximum: 100
It's unclear to me what could be the root cause- the schema object seems to exist?
Refs https://github.com/evcc-io/docs/issues/823
Please use https://github.com/getkin/kin-openapi#validating-an-openapi-document and upload a /minimally/ reproducing OpenAPI spec. I'm not going to do this for you.
Thank you, wasn‘t aware of this.
No additional insights:
go run github.com/getkin/kin-openapi/cmd/validate@latest rest-api.yaml.txt
2025/06/23 20:51:46 Loading error: bad data in "#/components/parameters/soc" (expecting ref to schema object)
exit status 1