Package io.muserver.rest
Interface SchemaObjectCustomizer
-
public interface SchemaObjectCustomizer
A class that can customize theSchemaObject
s generated in OpenAPI documents for JAX-RS resources.To register a customizer, use
RestHandlerBuilder.addSchemaObjectCustomizer(SchemaObjectCustomizer)
or implementSchemaObjectCustomizer
in any rest resources registered with a rest handler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SchemaObjectBuilder
customize(SchemaObjectBuilder builder, SchemaObjectCustomizerContext context)
Optionally change, remove, or create a new schema builder for a piece of an OpenAPI document.
-
-
-
Method Detail
-
customize
SchemaObjectBuilder customize(SchemaObjectBuilder builder, SchemaObjectCustomizerContext context)
Optionally change, remove, or create a new schema builder for a piece of an OpenAPI document.- Parameters:
builder
- A builder for a schema that values that have been inferred by MuServer, or by previous customizerscontext
- Information about the part of the document that is being documented (e.g. if it is a schema object for a request body, or response body, etc) along with other data that may be useful when generating the schema object.- Returns:
- The schema builder
-
-