OpenAPI 3 security and formatting warnings
You can use Postman to identify any potential security and formatting issues when defining your API.
Warnings for OpenAPI 3
For all APIs defined in OpenAPI 3.0 and 3.1, the following list describes possible warning messages and potential ways to resolve them.
- Broken object level authorization
- Broken user authentication
- Security field is not defined
- Security field does not contain any item
- Security field does not contain any scheme
- Security scheme object not defined
- Security scheme object does not contain any scheme
- Scheme used in security field is not defined in the security scheme object
- HTTP authentication scheme is using an unknown scheme
- Security field for the operation does not contain any item
- Security field for the operation does not contain any scheme
- Operation does not enforce any security scheme
- Excessive data exposure
- API accepts credentials from OAuth authentication in plain text
- API accepts credentials from OpenID Connect authentication in plain text
- API accepts credentials from OAuth 1.0 authentication in plain text
- API accepts API key in plain text
- API accepts auth credentials in plain text
- Global server URL uses HTTP protocol
- Operation accepts credentials from OAuth authentication in plain text
- Operation accepts credentials from OpenID Connect authentication as plain text
- Operation accepts credentials from OAuth 1.0 authentication in plain text
- Operation accepts API key in plain text
- Operation accepts authentication credentials in plain text
- Server URL of the operation is using HTTP protocol
- Authorization URL uses HTTP protocol; credentials will be transferred as plain text
- Token URL uses HTTP protocol
- Refresh URL uses HTTP protocol
- OpenID Connect URL uses HTTP protocol
- Improper assets management
- API information
- The info object should have a description
- The info object should have a license
- The info object should have a license URL
- The info object should have a terms of service
- API must have contact information available
- API must have a contact name available
- API must have a contact URL or email available
- API must have a contact email available
- API must have a contact URL available
- Operations
- There should be no trailing slashes on paths
- All operations should have summaries
- Operation summaries shouldn’t end with a period
- All operations should have descriptions
- All parameters should have descriptions
- All parameters should have examples
- POST methods should have request bodies
- PUT methods should have request bodies
- PATCH methods should have request bodies
- All request bodies should have examples
- Operation should return a 2xx HTTP status code
- Operation should return a 5xx HTTP status code
- All responses should have examples
- A 204 response can’t have a body
- Models
Broken object level authorization
Scope for OAuth scheme used in security field is not defined in the securityScheme declaration
Resolution
Scope for OAuth scheme used is not defined in the securityScheme declaration
Resolution
Broken user authentication
Security field is not defined
Resolution
Security field does not contain any item
Resolution
Security field does not contain any scheme
Resolution
Security scheme object not defined
Resolution
Security scheme object does not contain any scheme
Resolution
Scheme used in security field is not defined in the security scheme object
Resolution
HTTP authentication scheme is using an unknown scheme
Resolution
Security field for the operation does not contain any item
Resolution
Security field for the operation does not contain any scheme
Resolution
Operation does not enforce any security scheme
Resolution
Excessive data exposure
API accepts credentials from OAuth authentication in plain text
Resolution
API accepts credentials from OpenID Connect authentication in plain text
Resolution
API accepts credentials from OAuth 1.0 authentication in plain text
Resolution
API accepts API key in plain text
Resolution
API accepts auth credentials in plain text
Resolution
Global server URL uses HTTP protocol
Resolution
Operation accepts credentials from OAuth authentication in plain text
Resolution
Operation accepts credentials from OpenID Connect authentication as plain text
Resolution
Operation accepts credentials from OAuth 1.0 authentication in plain text
Resolution
Operation accepts API key in plain text
Resolution
Operation accepts authentication credentials in plain text
Resolution
Server URL of the operation is using HTTP protocol
Resolution
Authorization URL uses HTTP protocol; credentials will be transferred as plain text
Resolution
Token URL uses HTTP protocol
Resolution
Refresh URL uses HTTP protocol
Resolution
OpenID Connect URL uses HTTP protocol
Resolution
Improper assets management
Deprecated OAuth 1.0 scheme is used
Resolution
OAuth authentication uses the deprecated implicit flow
Resolution
OAuth authentication uses the deprecated password flow
Resolution
API information
This rule category deals with the OpenAPI info object, which has metadata about the API.
The info object should have a description
Resolution
The info object should have a license
Resolution
The info object should have a license URL
Resolution
The info object should have a terms of service
Resolution
API must have contact information available
Resolution
API must have a contact name available
Resolution
API must have a contact URL or email available
Resolution
API must have a contact email available
Resolution
API must have a contact URL available
Resolution
Operations
This rule category deals with operations on an API path.
There should be no trailing slashes on paths
Resolution
All operations should have summaries
Resolution
Operation summaries shouldn’t end with a period
Resolution
All operations should have descriptions
Resolution
All parameters should have descriptions
Resolution
All parameters should have examples
Resolution
POST methods should have request bodies
Resolution
PUT methods should have request bodies
Resolution
PATCH methods should have request bodies
Resolution
All request bodies should have examples
Resolution
Operation should return a 2xx HTTP status code
Resolution
Operation should return a 5xx HTTP status code
Resolution
All responses should have examples
Resolution
A 204 response can’t have a body
Resolution
Models
This rule category deals with how to model various data types.