-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
53 scc multiapi converteropenapi rewrite the logic for anyofs (#70)
- Loading branch information
1 parent
adf1670
commit c05b018
Showing
16 changed files
with
1,525 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
945 changes: 721 additions & 224 deletions
945
src/main/java/net/coru/multiapi/converter/openapi/OpenApiContractConverter.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/net/coru/multiapi/converter/openapi/model/ConverterPathItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package net.coru.multiapi.converter.openapi.model; | ||
|
||
import io.swagger.v3.oas.models.Operation; | ||
import lombok.Builder; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.Value; | ||
|
||
@Value | ||
@Builder | ||
@RequiredArgsConstructor | ||
public class ConverterPathItem { | ||
|
||
OperationType operationType; | ||
|
||
Operation operation; | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/net/coru/multiapi/converter/openapi/model/OperationType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.coru.multiapi.converter.openapi.model; | ||
|
||
public enum OperationType { | ||
POST, GET, PATCH, PUT, DELETE; | ||
|
||
public static boolean isValid(final String name) { | ||
final boolean result; | ||
switch (name.toUpperCase()) { | ||
case "POST": | ||
case "PUT": | ||
case "GET": | ||
case "PATCH": | ||
case "DELETE": | ||
result = true; | ||
break; | ||
default: | ||
result = false; | ||
break; | ||
} | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.