{new} OpenAPI Schema Part Parsing
Parameters annotated with any of the following are parsed using the registered {@link oaj.oapi.OpenApiParser} and therefore support OpenAPI syntax and validation:
Content-Type must match
For example, the following shows how a pipe-delimited list of comma-delimited numbers (e.g. Longs:
Input will be converted based on the types and formats defined in the schema definition.
Input validations such as minLength/maxLength that don't match the input will result in automatic 400 Bad Request responses.
The following shows the same for a request body:
The list of valid POJO types for parameters depends on type and format of the value or items/entries of the value.
For example, instead of Longs in the example above, we could also define a 2-dimensional array of POJOs convertible from Longs:
Or even POJOs that take in arrays of Longs[]:
Or even POJOs that take in the whole 2-dimensional array:
As you can see, the complexity of possible input types expands significantly.
For more information about valid parameter types, see {@doc juneau-marshall.OpenApiDetails.Parsers OpenAPI Parsers}