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

[jmeter] Fix exception when operationId has $ #17125

Merged
merged 2 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
generatorName: jmeter
outputDir: samples/client/petstore/jmeter
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/jmeter/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/jmeter-client
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ public void preprocessOpenAPI(OpenAPI openAPI) {
}
}

@Override
public String toOperationId(String operationId) {
// replace $ with _
return super.toOperationId(operationId.replace("$", "_"));
}

/**
* Escapes a reserved word as defined in the `reservedWords` array. Handle escaping
* those terms here. This logic is only called if a variable matches the reserved words
Expand Down
Loading
Loading