Francesco Chicchiriccò created SYNCOPE-1274:
-----------------------------------------------

             Summary: Report required and read-only payload properties in 
OpenApi spec
                 Key: SYNCOPE-1274
                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1274
             Project: Syncope
          Issue Type: Improvement
          Components: common
    Affects Versions: 2.0.7
            Reporter: Francesco Chicchiriccò
             Fix For: 2.0.8, 2.1.0
         Attachments: model-after.png, model-before.png

The OpenApi spec is currently missing any required and read-only information 
about payload properties.

For example, the {{POST /users}} endpoint reports the following sample value:
{code:java}
{
  "creator": "string",
  "creationDate": "2018-02-11T14:19:38.905Z",
  "lastModifier": "string",
  "lastChangeDate": "2018-02-11T14:19:38.905Z",
  "key": "string",
  "type": "string",
  "realm": "string",
  "status": "string",
  "password": "string",
  "token": "string",
  "tokenExpireTime": "2018-02-11T14:19:38.905Z",
  "username": "string",
  "lastLoginDate": "2018-02-11T14:19:38.905Z",
  "changePwdDate": "2018-02-11T14:19:38.905Z",
  "failedLogins": 0,
  "securityQuestion": "string",
  "securityAnswer": "string",
  "suspended": true,
  "mustChangePassword": true
}
{code}
which should be better instead
{code:java}
{
  "realm": "string",
  "@class": "org.apache.syncope.common.lib.to.UserTO",
  "password": "string",
  "username": "string",
  "securityQuestion": "string",
  "securityAnswer": "string"
}
{code}
(also note the Jackson's {{@class}} management).

Similar for models (see attachments as samples).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to