biocad / openapi3

OpenAPI 3.0 data model
BSD 3-Clause "New" or "Revised" License
39 stars 54 forks source link

fix: name generation of component object #74

Open teto opened 1 year ago

teto commented 1 year ago

While checking my generated openapi spec with https://editor.swagger.io/ I had errors like:

Semantic error at components.schemas.BaselineCheck_'HasCasePhysicalUnit Component names can only contain the characters A-Z a-z 0-9 - .

Looking at the spec: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#components-object This looked like a valid concern: name must conform to ^[a-zA-Z0-9\.\-_]+$

This replaces invalid characters by their code.