From 52e9ccff0e9ea4d6a439c30d7c02ec9899526017 Mon Sep 17 00:00:00 2001 From: Augustus Mayo Date: Mon, 9 Sep 2024 14:45:11 -0500 Subject: [PATCH] Allow component names to contain underscores (#268) * 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 --- oxide-openapi-gen-ts/src/client/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oxide-openapi-gen-ts/src/client/base.ts b/oxide-openapi-gen-ts/src/client/base.ts index c24e42e..9c4e48d 100644 --- a/oxide-openapi-gen-ts/src/client/base.ts +++ b/oxide-openapi-gen-ts/src/client/base.ts @@ -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/", "")), ]) );