Union Pacific · API Governance Rules
Union Pacific API Rules
Spectral linting rules defining API design standards and conventions for Union Pacific.
36 Rules
error 13
warn 18
info 5
Rule Categories
components
get
info
no
openapi
operation
parameter
paths
query
request
response
rpc
schema
security
servers
Rules
error
info-title-required
$.info
warn
info-title-contains-union-pacific
$.info.title
warn
info-description-required
$.info
error
info-version-required
$.info
error
openapi-version-3
$
error
servers-defined
$
error
servers-https-only
$.servers[*].url
info
paths-camel-case-convention
$.paths[*]~
warn
paths-no-trailing-slash
$.paths[*]~
error
operation-id-required
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-id-camel-case
$.paths[*][get,post,put,patch,delete,head,options].operationId
error
operation-summary-required
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-summary-title-case
$.paths[*][get,post,put,patch,delete,head,options].summary
warn
operation-description-required
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-tags-required
$.paths[*][get,post,put,patch,delete,head,options]
warn
parameter-description-required
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
request-body-json
$.paths[*][post,put,patch].requestBody.content
warn
request-body-description
$.paths[*][post,put,patch].requestBody
error
response-success-defined
$.paths[*][get,post,put,patch,delete]
error
response-description-required
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-401-unauthorized
$.paths[*][get,post,put,patch,delete]
info
response-400-bad-request
$.paths[*][post,put,patch]
warn
schema-property-camel-case
$.components.schemas[*].properties[*]~
warn
schema-description-required
$.components.schemas[*]
error
security-schemes-defined
$.components
warn
security-oauth2-present
$.components.securitySchemes[*]
error
get-no-request-body
$.paths[*].get
info
rpc-style-post
$.paths[?(@property =~ /release|order|cancel/)][*]
warn
no-empty-descriptions
$..description
error
components-schemas-defined
$.components
warn
servers-expected-domain
Server URLs should be on the up.com domain.
$.servers[*].url
info
query-params-casing
Query parameters should be camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
operation-documents-401
Operations should document a 401 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses