Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sapiens-sapide/d311bbea5372a9cbcd22cb0c0e1043e0 to your computer and use it in GitHub Desktop.
Save sapiens-sapide/d311bbea5372a9cbcd22cb0c0e1043e0 to your computer and use it in GitHub Desktop.
prism test on caliopen's swagger -> route authentication
"x-stoplight": {
"beforeScript": null,
"afterScript": null,
"mock": {
"enabled": true,
"dynamic": false,
"statusCode": 200
}
}
}
"responses": {
"200": {
"description": "Successful authentication",
"schema": {
"type": "object",
"properties": {
"username": {
"type": "string",
"pattern": "stansab"
},
"user_id": {
"type": "string",
"description": "the user_id makes the 'username' for basicAuth"
},
"tokens": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "the access_token makes the 'password' for basicAuth",
"pattern": "this is a mocked access_token"
},
"expires_in": {
"type": "integer",
"format": "int32"
},
"expires_at": {
"type": "string"
},
"refresh_token": {
"type": "string"
}
}
}
},
"additionalProperties": false,
"required": ["username", "user_id", "tokens"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment