Comments (1)
Original documentation (taken from https://docops.ca.com/x/r9SVH):
REST API Document Format
Document format
The response is to be in a JSON format and media type value is application/json
. The name of the fields is to use camelCase
. If the request is processed without any errors and warnings, then the response format is to be either a JSON object or JSON array. If the request is processed with an error or warning, then the response is to follow the JSON format as in the following code:
{
"messages": [
{
"messageType": "ERROR",
"messageNumber": "CSR0001",
"messageContent": "Pet with id '404' is not found"
}
]
}
The above response contains a messages section. The messages array is a place for application (or service) status and message descriptions to complement and enhance the basic HTTP status codes that are returned in the HTTP status line.
Rules for messages
Follow the principle that message key (for example org.zowe.sdk.apiml.serviceCertificateNotTrusted
) is for the code and message content (readable text) is for people. When an error occurs, The HTTP status codes are returned. Provide more details within this message structure. The meaning of the fields is (in order of importance):
- Required:
- messageType - severity -
ERROR
,WARNING
,INFO
,DEBUG
, orTRACE
- messageNumber - typical mainframe message ID (not including the severity code) that can be found in CA documentation
- messageContent - Readable message in US English
- messageType - severity -
- Optional:
- messageReason - Supplements the messageContent field, supplying more information about why the message is present.
- messageAction - Recommendation of the actions to take in response to the message.
- messageKey - unique message key - describing the reason for the error. It should be a dot-delimited string
tld.provider.service[.subservice].detail
. For example:org.zowe.sdk.apiml.serviceCertificateNotTrusted
. The purpose of this field is to enable UI to show a meaningful and localized error message. The message key is used instead of the message number as the number makes the code hard to read, and makes renumbering difficult and error-prone. - messageParameters - error message parameters. Used for formatting of localized messages.
- messageInstanceId - unique ID of the message instance. Useful for locating of the message in the logs. The same ID should be printed in the log.
- messageComponent - for support and developers - component that generated the error (can be fully qualified Java package or class name)
- messageSource - for support and developers - source service that generated the error (can Open Mainframe service name or host:port).Be sure to include as much useful data as possible and keep in mind different users of the message structure. However, be mindful not to leak data that should be kept private or implementation details to avoid breaches in security.
from sample-spring-boot-api-service.
Related Issues (20)
- "https" profile in application.yml has no effect
- Misleading security message in rest-api-commons
- Proxy problem HOT 1
- Document Manual Deployment
- Document zowe-api.json
- zowe-api-dev init generates incorrect zosTargetDir HOT 1
- zowe-api-dev start --job not documented
- zowe-api-dev stop supports only java started by Jzos launcher HOT 3
- zowe-api-dev Variable replacing HOT 1
- zowe-api-dev config --force HOT 1
- Problems registering Zowe Sample API Service HOT 5
- OMVS Segment Required
- Were MFAAS dependencies moved to https://zowe.jfrog.io/? HOT 2
- zowe-api-dev config --name zos Cannot use template
- Use zowe.jfrog.io
- Minor defect - Missing period in error message
- List used third-party components so the SDK can be easily approved
- Document methods for taking diagnostics information
- Security Documentation - Commands and Requirements Don't Match HOT 3
- Make SonarCloud work for pull requests with CircleCI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sample-spring-boot-api-service.