forked from citrusframework/citrus-simulator
-
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.
feat(citrusframework#285): support OpenAPI 3.0 from HttpOperationScen…
…ario
- Loading branch information
Thorsten Schlathoelter
committed
Oct 31, 2024
1 parent
1324fa3
commit a4d91cd
Showing
19 changed files
with
1,075 additions
and
652 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
25 changes: 25 additions & 0 deletions
25
...t/src/main/java/org/citrusframework/simulator/config/OpenApiScenarioIdGenerationMode.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,25 @@ | ||
package org.citrusframework.simulator.config; | ||
|
||
/** | ||
* Enumeration representing the modes for generating scenario IDs in an OpenAPI context. | ||
* This enumeration defines two modes: | ||
* <ul> | ||
* <li>{@link #OPERATION_ID}: Uses the operation ID defined in the OpenAPI specification.</li> | ||
* <li>{@link #FULL_PATH}: Uses the full path of the API endpoint.</li> | ||
* </ul> | ||
* The choice of mode affects how scenario IDs are generated, with important implications: | ||
* <ul> | ||
* <li><b>OPERATION_ID:</b> This mode relies on the {@code operationId} field in the OpenAPI specification, which | ||
* provides a unique identifier for each operation. However, the {@code operationId} is not mandatory in the OpenAPI | ||
* specification. If an {@code operationId} is not specified, this mode cannot be used effectively.</li> | ||
* <li><b>FULL_PATH:</b> This mode constructs scenario IDs based on the entire URL path of the API endpoint, including | ||
* path parameters. This is particularly useful when simulating multiple versions of the same API, as it allows for | ||
* differentiation based on the endpoint path. This mode ensures unique scenario IDs even when {@code operationId} | ||
* is not available or when versioning of APIs needs to be distinguished.</li> | ||
* </ul> | ||
* </p> | ||
*/ | ||
public enum OpenApiScenarioIdGenerationMode { | ||
FULL_PATH, | ||
OPERATION_ID | ||
} |
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.