Restrictions invoking a REST API 3.0 service
Draft comment:
This topic was viewed 302 times since its publication
Some support restrictions apply to OpenAPI specifications and type mappings between
OpenAPI types and XSD types.
This topic was viewed 302 times since its publication
Unsupported OpenAPI specifications
The following OpenAPI specifications are ignored:
allOf,oneOf,anyOfandnotproperties- OpenAPI 2.0 input files
- OpenAPI 3.0 input files with
$refproperties to#/components/parameters/namefor parameters,#/components/responses/namefor responses or#/components/securitySchemes/namefor security schemes - OpenAPI 3.0 input files with
$refproperties that refer to elements in other locations than#/components/schemas/namefor schemas, or#/components/requestBodies/namefor request bodies maxLengthandminLengthproperties for type string for parametersmultipleOfproperty for types Integer and DecimalallowEmptyValuepropertymaxProperties,minProperties, andadditionalPropertiesbusiness object propertiesmaxItemsandminItemsbusiness object array properties- email, password, and hostname formats for type String
- OpenAPI sections
security,tags, andexternalDocs
Type mappings between OpenAPI and XSD
| <OpenAPI> format | XSD-type |
|---|---|
| number | decimal |
| number (double) | double |
| number (float) | float |
| integer | integer |
| integer (int32) | int |
| integer (int64) | long |
| string | string |
| string (byte) | string |
| string (binary) | hexBinary |
| string (date) | date |
| string (date-time) | dateTime |
| string (password) | string |
Default for types without a format element are
integer->integernumber->decimalstring->string
Supported media types
The only media types supported are
- application/json
- application/xml
- text/xml
- text/plain
Composition and Inheritance (Polymorphism)
The element allOf is not supported.
If allOf is detected, a warning message displays and the WSDL artifacts are not
generated for this construct.
For example, this definition is ignored:
Dog:
allOf:
- $ref: '#/components/schemas/Animal'
- type: object
properties:
breed:
type: stringThe following message displays:
2021-05-27 16:13:27 WARNING com.ibm.ws.bpm.openapi.discovery.walker.OpenApiWalker walkSchema Construct'allOf'for schema 'Dog'not supported
Defined server elements
The following is an example of an OpenAPI definition:
servers:
- url: http://localhost:9080/test
- url: https://localhost:9080/test
The following log message displays:
2021-05-27 16:12:06 WARNING com.ibm.ws.bpm.openapi.discovery.walker.OpenApiWalker walkServers Server element https://localhost:9080/test is ignoredUnsupported media type
The following is an example of an unsupported media type OpenAPI definition:
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
name:
description: Updated name of the pet
type: string
status:
description: Updated status of the pet
type: string
The following log message displays:
2021-05-27 16:15:07 WARNING com.ibm.ws.bpm.openapi.discovery.walker.wsdl.WSDLModel setSupported OperationId 'updatePetWithForm' (operation 'Post_updatePetWithForm) will be ignored because no supported Media type found in 'requestBody element
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-01-20 10:38