-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michael Edgar <[email protected]>
- Loading branch information
Showing
4 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
core/src/main/java/io/smallrye/openapi/api/OperationHandler.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,38 @@ | ||
package io.smallrye.openapi.api; | ||
|
||
import org.eclipse.microprofile.openapi.models.Operation; | ||
import org.jboss.jandex.ClassInfo; | ||
import org.jboss.jandex.MethodInfo; | ||
|
||
/** | ||
* Handler interface for a platform integration layer to inspect or modify an operation. | ||
* | ||
* The resource method and class from which the operation was constructed are | ||
* also provided. | ||
* | ||
* @since 4.0 | ||
*/ | ||
@FunctionalInterface | ||
public interface OperationHandler { | ||
|
||
static final OperationHandler DEFAULT = (o, c, m) -> { | ||
}; | ||
|
||
/** | ||
* Callback to allow modification to an {@link Operation operation}, | ||
* together with the associated resource class and resource method | ||
* associated with the operation. | ||
* | ||
* @param operation | ||
* the OpenAPI operation model created from the resource | ||
* class/method | ||
* @param resourceClass | ||
* the resource class that hosts REST endpoint methods | ||
* @param resourceMethod | ||
* resource method for a REST request. The method's declaring | ||
* class may differ from the resource class. For example it may | ||
* have been declared in an abstract class or interface. | ||
*/ | ||
void handleOperation(Operation operation, ClassInfo resourceClass, MethodInfo resourceMethod); | ||
|
||
} |
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