Skip to main content

OpenApi Basics

Juneau supports converting arbitrary POJOs to and from strings using OpenAPI-based schema rules.

The relevant classes for using OpenAPI-based serialization are:

OpenApiSerializer - Converts POJOs to strings.OpenApiParser - Converts strings to POJOs.HttpPartSchema - Defines the schema for your POJO.

The HttpPartSchema class is used to define the formatting and validations for a POJO. It's used in conjunction with the serializer and parser to produce and consume HTTP parts based on OpenAPI rules.

Later in the rest-server and rest-client sections, we also describe how the following annotations can be applied to method parameters and class types to define the schema for various HTTP parts:

Content Header Query FormData Path Response