Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug: Unable to use {service-name} interpolation for filenames with openapi3-emitter when only one service is defined #6182

Merged
merged 12 commits into from
Mar 3, 2025
Prev Previous commit
Next Next commit
one more case
  • Loading branch information
albertxavier100 committed Feb 27, 2025
commit ca7e9866d150757a3c61431a2a247e07f53b87eb
7 changes: 7 additions & 0 deletions packages/openapi3/test/emit-openapi.test.ts
Original file line number Diff line number Diff line change
@@ -116,6 +116,13 @@ describe("Scalar formats of serialized document in YAML", () => {
outputFilePattern: "{service-name-if-multiple}.yaml",
expectedOutputFiles: [resolveVirtualPath("AAA.yaml"), resolveVirtualPath("BBB.yaml")],
},
// fixed name cases
{
description: "fixed name for one service",
code: "@service namespace AAA { model M {a: string} }",
outputFilePattern: "fixed-name.yaml",
expectedOutputFiles: [resolveVirtualPath("fixed-name.yaml")],
},
])("$description", async (c: ServiceNameCase) => {
const options = {
"output-file": c.outputFilePattern,
Loading
Oops, something went wrong.