Skip to content

Commit

Permalink
docs: Updates error layout
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas authored and arekkas committed Jun 24, 2018
1 parent 725c075 commit 2a561b4
Show file tree
Hide file tree
Showing 20 changed files with 228 additions and 218 deletions.
15 changes: 4 additions & 11 deletions doc_swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,10 @@ package main
type genericError struct {
// in: body
Body struct {
Code int `json:"code,omitempty"`

Status string `json:"status,omitempty"`

Request string `json:"request,omitempty"`

Reason string `json:"reason,omitempty"`

Details []map[string]interface{} `json:"details,omitempty"`

Message string `json:"message"`
Name string `json:"error"`
Hint string `json:"error_hint"`
Code int `json:"error_code"`
Debug int `json:"error_debug"`
}
}

Expand Down
50 changes: 25 additions & 25 deletions docs/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2274,14 +2274,19 @@
"x-go-name": "SectorIdentifierURI"
},
"token_endpoint_auth_method": {
"description": "Requested Client Authentication method for the Token Endpoint. The options are client_secret_post,\nclient_secret_basic, client_secret_jwt, private_key_jwt, and none.",
"description": "Requested Client Authentication method for the Token Endpoint. The options are client_secret_post,\nclient_secret_basic, private_key_jwt, and none.",
"type": "string",
"x-go-name": "TokenEndpointAuthMethod"
},
"tos_uri": {
"description": "TermsOfServiceURI is a URL string that points to a human-readable terms of service\ndocument for the client that describes a contractual relationship\nbetween the end-user and the client that the end-user accepts when\nauthorizing the client.",
"type": "string",
"x-go-name": "TermsOfServiceURI"
},
"userinfo_signed_response_alg": {
"description": "JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT\n[JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims\nas a UTF-8 encoded JSON object using the application/json content-type.",
"type": "string",
"x-go-name": "UserinfoSignedResponseAlg"
}
},
"x-go-name": "Client",
Expand Down Expand Up @@ -2849,6 +2854,14 @@
"description": "URL of the OP's UserInfo Endpoint.",
"type": "string",
"x-go-name": "UserinfoEndpoint"
},
"userinfo_signing_alg_values_supported": {
"description": "JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "UserinfoSigningAlgValuesSupported"
}
},
"x-go-name": "WellKnown",
Expand All @@ -2864,36 +2877,23 @@
"schema": {
"type": "object",
"properties": {
"code": {
"error": {
"type": "string",
"x-go-name": "Name"
},
"error_code": {
"type": "integer",
"format": "int64",
"x-go-name": "Code"
},
"details": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"x-go-name": "Details"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"reason": {
"type": "string",
"x-go-name": "Reason"
},
"request": {
"type": "string",
"x-go-name": "Request"
"error_debug": {
"type": "integer",
"format": "int64",
"x-go-name": "Debug"
},
"status": {
"error_hint": {
"type": "string",
"x-go-name": "Status"
"x-go-name": "Hint"
}
}
}
Expand Down
10 changes: 4 additions & 6 deletions sdk/go/hydra/swagger/docs/InlineResponse401.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **int64** | | [optional] [default to null]
**Details** | [**[]map[string]interface{}**](map.md) | | [optional] [default to null]
**Message** | **string** | | [optional] [default to null]
**Reason** | **string** | | [optional] [default to null]
**Request** | **string** | | [optional] [default to null]
**Status** | **string** | | [optional] [default to null]
**Error_** | **string** | | [optional] [default to null]
**ErrorCode** | **int64** | | [optional] [default to null]
**ErrorDebug** | **int64** | | [optional] [default to null]
**ErrorHint** | **string** | | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
3 changes: 2 additions & 1 deletion sdk/go/hydra/swagger/docs/OAuth2Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ Name | Type | Description | Notes
**ResponseTypes** | **[]string** | ResponseTypes is an array of the OAuth 2.0 response type strings that the client can use at the authorization endpoint. | [optional] [default to null]
**Scope** | **string** | Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. | [optional] [default to null]
**SectorIdentifierUri** | **string** | URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values. | [optional] [default to null]
**TokenEndpointAuthMethod** | **string** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, private_key_jwt, and none. | [optional] [default to null]
**TokenEndpointAuthMethod** | **string** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] [default to null]
**TosUri** | **string** | TermsOfServiceURI is a URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client. | [optional] [default to null]
**UserinfoSignedResponseAlg** | **string** | JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type. | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions sdk/go/hydra/swagger/docs/WellKnown.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Name | Type | Description | Notes
**TokenEndpoint** | **string** | URL of the OP's OAuth 2.0 Token Endpoint | [default to null]
**TokenEndpointAuthMethodsSupported** | **[]string** | JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 | [optional] [default to null]
**UserinfoEndpoint** | **string** | URL of the OP's UserInfo Endpoint. | [optional] [default to null]
**UserinfoSigningAlgValuesSupported** | **[]string** | JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
12 changes: 4 additions & 8 deletions sdk/go/hydra/swagger/inline_response_401.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@
package swagger

type InlineResponse401 struct {
Code int64 `json:"code,omitempty"`
Error_ string `json:"error,omitempty"`

Details []map[string]interface{} `json:"details,omitempty"`
ErrorCode int64 `json:"error_code,omitempty"`

Message string `json:"message,omitempty"`
ErrorDebug int64 `json:"error_debug,omitempty"`

Reason string `json:"reason,omitempty"`

Request string `json:"request,omitempty"`

Status string `json:"status,omitempty"`
ErrorHint string `json:"error_hint,omitempty"`
}
5 changes: 4 additions & 1 deletion sdk/go/hydra/swagger/o_auth2_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ type OAuth2Client struct {
// URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.
SectorIdentifierUri string `json:"sector_identifier_uri,omitempty"`

// Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, private_key_jwt, and none.
// Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"`

// TermsOfServiceURI is a URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.
TosUri string `json:"tos_uri,omitempty"`

// JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.
UserinfoSignedResponseAlg string `json:"userinfo_signed_response_alg,omitempty"`
}
3 changes: 3 additions & 0 deletions sdk/go/hydra/swagger/well_known.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ type WellKnown struct {

// URL of the OP's UserInfo Endpoint.
UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"`

// JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
UserinfoSigningAlgValuesSupported []string `json:"userinfo_signing_alg_values_supported,omitempty"`
}
10 changes: 4 additions & 6 deletions sdk/js/swagger/docs/InlineResponse401.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Number** | | [optional]
**details** | **[{String: Object}]** | | [optional]
**message** | **String** | | [optional]
**reason** | **String** | | [optional]
**request** | **String** | | [optional]
**status** | **String** | | [optional]
**error** | **String** | | [optional]
**errorCode** | **Number** | | [optional]
**errorDebug** | **Number** | | [optional]
**errorHint** | **String** | | [optional]


3 changes: 2 additions & 1 deletion sdk/js/swagger/docs/OAuth2Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Name | Type | Description | Notes
**responseTypes** | **[String]** | ResponseTypes is an array of the OAuth 2.0 response type strings that the client can use at the authorization endpoint. | [optional]
**scope** | **String** | Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. | [optional]
**sectorIdentifierUri** | **String** | URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values. | [optional]
**tokenEndpointAuthMethod** | **String** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, private_key_jwt, and none. | [optional]
**tokenEndpointAuthMethod** | **String** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional]
**tosUri** | **String** | TermsOfServiceURI is a URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client. | [optional]
**userinfoSignedResponseAlg** | **String** | JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type. | [optional]


1 change: 1 addition & 0 deletions sdk/js/swagger/docs/WellKnown.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ Name | Type | Description | Notes
**tokenEndpoint** | **String** | URL of the OP's OAuth 2.0 Token Endpoint |
**tokenEndpointAuthMethodsSupported** | **[String]** | JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 | [optional]
**userinfoEndpoint** | **String** | URL of the OP's UserInfo Endpoint. | [optional]
**userinfoSigningAlgValuesSupported** | **[String]** | JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. | [optional]


57 changes: 25 additions & 32 deletions sdk/js/swagger/src/model/InlineResponse401.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,54 +59,47 @@
if (data) {
obj = obj || new exports()

if (data.hasOwnProperty('code')) {
obj['code'] = ApiClient.convertToType(data['code'], 'Number')
if (data.hasOwnProperty('error')) {
obj['error'] = ApiClient.convertToType(data['error'], 'String')
}
if (data.hasOwnProperty('details')) {
obj['details'] = ApiClient.convertToType(data['details'], [
{ String: Object }
])
if (data.hasOwnProperty('error_code')) {
obj['error_code'] = ApiClient.convertToType(
data['error_code'],
'Number'
)
}
if (data.hasOwnProperty('message')) {
obj['message'] = ApiClient.convertToType(data['message'], 'String')
if (data.hasOwnProperty('error_debug')) {
obj['error_debug'] = ApiClient.convertToType(
data['error_debug'],
'Number'
)
}
if (data.hasOwnProperty('reason')) {
obj['reason'] = ApiClient.convertToType(data['reason'], 'String')
}
if (data.hasOwnProperty('request')) {
obj['request'] = ApiClient.convertToType(data['request'], 'String')
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String')
if (data.hasOwnProperty('error_hint')) {
obj['error_hint'] = ApiClient.convertToType(
data['error_hint'],
'String'
)
}
}
return obj
}

/**
* @member {Number} code
*/
exports.prototype['code'] = undefined
/**
* @member {Array.<Object.<String, Object>>} details
*/
exports.prototype['details'] = undefined
/**
* @member {String} message
* @member {String} error
*/
exports.prototype['message'] = undefined
exports.prototype['error'] = undefined
/**
* @member {String} reason
* @member {Number} error_code
*/
exports.prototype['reason'] = undefined
exports.prototype['error_code'] = undefined
/**
* @member {String} request
* @member {Number} error_debug
*/
exports.prototype['request'] = undefined
exports.prototype['error_debug'] = undefined
/**
* @member {String} status
* @member {String} error_hint
*/
exports.prototype['status'] = undefined
exports.prototype['error_hint'] = undefined

return exports
})
13 changes: 12 additions & 1 deletion sdk/js/swagger/src/model/OAuth2Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@
if (data.hasOwnProperty('tos_uri')) {
obj['tos_uri'] = ApiClient.convertToType(data['tos_uri'], 'String')
}
if (data.hasOwnProperty('userinfo_signed_response_alg')) {
obj['userinfo_signed_response_alg'] = ApiClient.convertToType(
data['userinfo_signed_response_alg'],
'String'
)
}
}
return obj
}
Expand Down Expand Up @@ -266,7 +272,7 @@
*/
exports.prototype['sector_identifier_uri'] = undefined
/**
* Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, private_key_jwt, and none.
* Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.
* @member {String} token_endpoint_auth_method
*/
exports.prototype['token_endpoint_auth_method'] = undefined
Expand All @@ -275,6 +281,11 @@
* @member {String} tos_uri
*/
exports.prototype['tos_uri'] = undefined
/**
* JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.
* @member {String} userinfo_signed_response_alg
*/
exports.prototype['userinfo_signed_response_alg'] = undefined

return exports
})
11 changes: 11 additions & 0 deletions sdk/js/swagger/src/model/WellKnown.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@
'String'
)
}
if (data.hasOwnProperty('userinfo_signing_alg_values_supported')) {
obj['userinfo_signing_alg_values_supported'] = ApiClient.convertToType(
data['userinfo_signing_alg_values_supported'],
['String']
)
}
}
return obj
}
Expand Down Expand Up @@ -283,6 +289,11 @@
* @member {String} userinfo_endpoint
*/
exports.prototype['userinfo_endpoint'] = undefined
/**
* JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
* @member {Array.<String>} userinfo_signing_alg_values_supported
*/
exports.prototype['userinfo_signing_alg_values_supported'] = undefined

return exports
})
10 changes: 4 additions & 6 deletions sdk/php/swagger/docs/Model/InlineResponse401.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **int** | | [optional]
**details** | [**map[string,object][]**](map.md) | | [optional]
**message** | **string** | | [optional]
**reason** | **string** | | [optional]
**request** | **string** | | [optional]
**status** | **string** | | [optional]
**error** | **string** | | [optional]
**error_code** | **int** | | [optional]
**error_debug** | **int** | | [optional]
**error_hint** | **string** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Loading

0 comments on commit 2a561b4

Please sign in to comment.