Record Class ChenilePolymorphVariant

java.lang.Object
java.lang.Record
org.chenile.core.polymorph.ChenilePolymorphVariant
Record Components:
name - the variant's complete, canonical name, used unchanged by MCP, OpenAPI and the registry. See ChenilePolymorphProvider.variantName(OperationDefinition, String).
description - a description sufficient to invoke the variant. Defaults to the operation's description when blank.
parameterTypes - the type of each parameter that differs from the operation's own declaration.
parameterSchemas - a JSON schema for a parameter that has no concrete type (an alternative to a type; both are not allowed for the same parameter).
parameterDescriptions - a description of each parameter, where available.
fixedParameterValues - the only allowed value of a parameter for this variant. These values select the variant of a request: a path variable or header with that value.
bodyDiscriminator - for subclass polymorphism, the top-level body field and value that select this variant. Null otherwise.
authorities - the authorities needed to invoke this variant. Empty means the operation's own authorities apply.

public record ChenilePolymorphVariant(String name, String description, Map<String,Type> parameterTypes, Map<String,String> parameterSchemas, Map<String,String> parameterDescriptions, Map<String,Object> fixedParameterValues, ChenilePolymorphVariant.BodyDiscriminator bodyDiscriminator, List<String> authorities) extends Record
One variant of a polymorphic operation. Let us say a service "foo" has an operation bar(String id, String type, Object payload) where type "abc" needs an AbcPayload and type "def" a DefPayload. The provider returns two variants: the first fixes type to "abc" and gives the payload the type AbcPayload, the second fixes type to "def" with DefPayload.