-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#1175): adds open api validation by standard citrus schema valid…
…aton mechanism
- Loading branch information
Showing
48 changed files
with
1,173 additions
and
511 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
24 changes: 24 additions & 0 deletions
24
...ctors/citrus-openapi/src/main/java/org/citrusframework/openapi/OpenApiMessageHeaders.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,24 @@ | ||
package org.citrusframework.openapi; | ||
|
||
import org.citrusframework.message.MessageHeaders; | ||
|
||
public class OpenApiMessageHeaders { | ||
|
||
public static final String OAS_PREFIX = MessageHeaders.PREFIX + "oas_"; | ||
|
||
public static final String OAS_OPERATION = OAS_PREFIX + "operation"; | ||
|
||
public static final String OAS_MEDIA_TYPE = OAS_PREFIX + "media_type"; | ||
|
||
public static final String OAS_UNIQUE_OPERATION_ID = OAS_PREFIX + "unique_operation_id"; | ||
|
||
public static final String OAS_MESSAGE_TYPE = OAS_PREFIX + "message_type"; | ||
|
||
public static final String RESPONSE_TYPE = OAS_PREFIX + "response"; | ||
|
||
public static final String REQUEST_TYPE = OAS_PREFIX + "request"; | ||
|
||
private OpenApiMessageHeaders() { | ||
// Static access only | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
connectors/citrus-openapi/src/main/java/org/citrusframework/openapi/OpenApiMessageType.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 org.citrusframework.openapi; | ||
|
||
/** | ||
* The {@code OpenApiMessageType} enum defines the types of OpenAPI messages, | ||
* specifically REQUEST and RESPONSE. Each type is associated with a specific | ||
* header name, which is used to identify the type of message in the OpenAPI | ||
* message headers. | ||
*/ | ||
public enum OpenApiMessageType { | ||
|
||
REQUEST(OpenApiMessageHeaders.REQUEST_TYPE), RESPONSE(OpenApiMessageHeaders.RESPONSE_TYPE); | ||
|
||
private final String headerName; | ||
|
||
OpenApiMessageType(String headerName) { | ||
this.headerName = headerName; | ||
} | ||
|
||
public String toHeaderName() { | ||
return headerName; | ||
} | ||
} |
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
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.