Closed joepjoosten closed 1 week ago
You're right, the generator was assuming that schemas have names that are valid JS identifiers. I pushed a fix that:
/
and ~
) don't cause parse errors.Also added a test for it. Published as v0.7.0. Let me know if this resolves the issue for you.
I will check
JS identifiers are ok now, but found a new issue #2
I'm parsing the spec for opensearch (https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml) which contains schemas with names like: "cat._common:CatPitSegmentsRecord" or "_common:AcknowledgedResponseBase", which will result in incorrect typescript code because the schemaId generated is invalid.