Skip to content
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
15 changes: 15 additions & 0 deletions bin/configs/ada.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
generatorName: ada
outputDir: samples/client/petstore/ada
inputSpec: modules/openapi-generator/src/test/resources/3_0/ada/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/Ada
nameMappings:
_type: P_UnderscoreType
type_: P_TypeWithUnderscore
http_debug_operation: P_HTTPDebugOperation
parameterNameMappings:
_type: UnderscoreType
type_: TypeWithUnderscore
http_debug_operation: HttpDebugOperation
additionalProperties:
modelPackage: Samples.Petstore
projectName: Petstore
7 changes: 0 additions & 7 deletions bin/configs/unmaintained/ada.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,21 @@ public String toOperationId(String operationId) {

@Override
public String toVarName(String name) {
// obtain the name from nameMapping directly if provided
if (nameMapping.containsKey(name)) {
return nameMapping.get(name);
}

return toAdaIdentifier(sanitizeName(name), "P_");
}

@Override
public String toParamName(String name) {
// obtain the name from parameterNameMapping directly if provided
if (parameterNameMapping.containsKey(name)) {
return parameterNameMapping.get(name);
}

return toAdaIdentifier(super.toParamName(name), "P_");
}

Expand Down Expand Up @@ -833,7 +843,6 @@ public int compareTo(ModelDepend second) {

@Override
public ModelsMap postProcessModels(ModelsMap objs) {

// This is run first, before the operations.
// remove model imports to avoid error
List<Map<String, String>> imports = objs.getImports();
Expand Down
Loading