55.7. Extra Options

download PDF


The extraOptions options are usually used to either compute or hide complex API parameters by providing simpler options instead. For example, the API method might take a POJO option, that could be provided more easily as parts of the POJO in the URI. The component could do this by adding the parts as extra options, and creating the POJO parameter internally. To complete the implementation of these extra options, you also need to override the interceptProperties method in the EndpointConsumer and/or EndpointProducer classes (see Section 54.4, “Programming Model”).


The extraOptions element can be defined with one or more extraOption child elements, as follows:
Where TypeName is the fully-qualified type name of the extra option and OptionName is the name of the extra URI option.


As shown in the following extract, the extraOptions element can optionally appear as a child of the apis element and/or as a child of api elements:
You can define the extraOptions element at the following scopes:
  • As a child of an api element—the extraOptions apply only to the API class specified by the api element.
  • As a child of the apis element—the extraOptions apply to all API classes by default, but can be overridden at the api level.

Child elements

Each extraOptions element can be defined with the following child elements:
Specifies the fully-qualified type name of the extra option.
Specifies the option name, as it would appear in an endpoint URI.


The following example defines an extra URI option, customOption, which is of java.util.list<String> type:
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.