Skip to content

Commit

Permalink
Merge pull request #1775 from lnash94/dicouple_flatten_from_sanitize
Browse files Browse the repository at this point in the history
Decouple the flatten from the sanitize sub command
  • Loading branch information
lnash94 authored Oct 7, 2024
2 parents d46a45b + 8a492e0 commit 00285c8
Show file tree
Hide file tree
Showing 4 changed files with 329 additions and 285 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public String getDefaultFileName() {
@Override
public Optional<OpenAPI> generate(String openAPIFileContent) {
Optional<OpenAPI> filteredOpenAPI = getFilteredOpenAPI(openAPIFileContent);
return filteredOpenAPI.flatMap(this::getFlattenOpenAPI).flatMap(this::sanitizeOpenAPI);
return filteredOpenAPI.flatMap(this::sanitizeOpenAPI);
}

private Optional<OpenAPI> sanitizeOpenAPI(OpenAPI openAPI) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ SYNOPSIS

DESCRIPTION
Sanitize the OpenAPI contract file according to the best naming
practices of Ballerina. The OpenAPI contract is flatten and the type
schema names are made Ballerina friendly. The Ballerina name
extensions are added to the schemas which can not be modified
directly.
practices of Ballerina. The Ballerina name extensions are added
to the schemas which can not be modified directly.


OPTIONS
Expand Down
Loading

0 comments on commit 00285c8

Please sign in to comment.