Skip to content

Commit

Permalink
Allow component names to contain underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Sep 9, 2024
1 parent d63fbda commit 741dae0
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 741dae0

Please sign in to comment.