Skip to content

Commit

Permalink
Allow component names to contain underscores (#268)
Browse files Browse the repository at this point in the history
* Allow component names to contain underscores

* Update name regex to match spec

* Autogenerate config update

* Lint fix

* Do not specify ending

* Autogenerate config update

* dummy commit to trigger CI

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: David Crespo <[email protected]>
  • Loading branch information
3 people authored Sep 9, 2024
1 parent 9c27d3c commit 52e9ccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oxide-openapi-gen-ts/src/client/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getSortedSchemas = (spec: OpenAPIV3.Document) => {
Object.keys(spec.components?.schemas || {}).map((name) => [
name,
JSON.stringify(spec.components!.schemas![name])
.match(/#\/components\/schemas\/[A-Za-z0-9]+/g)
.match(/#\/components\/schemas\/[a-zA-Z0-9.\-_]+/g)
?.map((s) => s.replace("#/components/schemas/", "")),
])
);
Expand Down

0 comments on commit 52e9ccf

Please sign in to comment.