Skip to content

Commit

Permalink
docs: Resolves broken swagger definitions (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas authored Mar 17, 2018
1 parent 605998f commit 4125eab
Show file tree
Hide file tree
Showing 300 changed files with 1,332 additions and 10,380 deletions.
298 changes: 96 additions & 202 deletions docs/api.swagger.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion health/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package health

// A list of clients.
// Instance health report
// swagger:response healthStatus
type swaggerListClientsResult struct {
// in: body
Expand Down
58 changes: 18 additions & 40 deletions oauth2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,14 @@ type swaggerAcceptConsentRequest struct {
Body AcceptConsentRequestPayload
}

// The consent request response
// swagger:response oAuth2ConsentRequest
type swaggerOAuthConsentRequest struct {
// in: body
Body swaggerConsentRequest
}

// The userinfo response
// swagger:response userinfoResponse
type swaggeruserinfoResponse struct {
// in: body
Body swaggeruserinfoResponsePayload
}

// swagger:parameters flushInactiveOAuth2Tokens
type swaggerFlushInactiveAccessTokens struct {
// in: body
Body FlushInactiveOAuth2TokensRequest
}

// The userinfo response
// swagger:model userinfoResponse
type swaggeruserinfoResponsePayload struct {
// Subject - Identifier for the End-User at the Issuer.
Subject string `json:"sub"`
Expand Down Expand Up @@ -149,38 +137,28 @@ type swaggeruserinfoResponsePayload struct {
}

// The token response
// swagger:response oauthTokenResponse
// swagger:model oauthTokenResponse
type swaggerOAuthTokenResponse struct {
// in: body
Body struct {
// The lifetime in seconds of the access token. For
// example, the value "3600" denotes that the access token will
// expire in one hour from the time the response was generated.
ExpiresIn int `json:"expires_in"`
// The lifetime in seconds of the access token. For
// example, the value "3600" denotes that the access token will
// expire in one hour from the time the response was generated.
ExpiresIn int `json:"expires_in"`

// The scope of the access token
Scope int `json:"scope"`
// The scope of the access token
Scope int `json:"scope"`

// To retrieve a refresh token request the id_token scope.
IDToken int `json:"id_token"`
// To retrieve a refresh token request the id_token scope.
IDToken int `json:"id_token"`

// The access token issued by the authorization server.
AccessToken string `json:"access_token"`
// The access token issued by the authorization server.
AccessToken string `json:"access_token"`

// The refresh token, which can be used to obtain new
// access tokens. To retrieve it add the scope "offline" to your access token request.
RefreshToken string `json:"refresh_token"`
// The refresh token, which can be used to obtain new
// access tokens. To retrieve it add the scope "offline" to your access token request.
RefreshToken string `json:"refresh_token"`

// The type of the token issued
TokenType string `json:"token_type"`
}
}

// The token introspection response
// swagger:response introspectOAuth2TokenResponse
type swaggerOAuthIntrospectionResponse struct {
// in: body
Body swaggerOAuthIntrospectionResponsePayload
// The type of the token issued
TokenType string `json:"token_type"`
}

// swagger:model oAuth2TokenIntrospection
Expand Down
2 changes: 1 addition & 1 deletion oauth2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (h *Handler) RevocationHandler(w http.ResponseWriter, r *http.Request, _ ht
// oauth2: hydra.introspect
//
// Responses:
// 200: introspectOAuth2TokenResponse
// 200: oAuth2TokenIntrospection
// 401: genericError
// 500: genericError
func (h *Handler) IntrospectHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
Expand Down
23 changes: 8 additions & 15 deletions sdk/go/hydra/swagger/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Go API client for swagger

Please refer to the user guide for in-depth documentation: https://ory.gitbooks.io/hydra/content/ Hydra offers OAuth 2.0 and OpenID Connect Core 1.0 capabilities as a service. Hydra is different, because it works with any existing authentication infrastructure, not just LDAP or SAML. By implementing a consent app (works with any programming language) you build a bridge between Hydra and your authentication infrastructure. Hydra is able to securely manage JSON Web Keys, and has a sophisticated policy-based access control you can use if you want to. Hydra is suitable for green- (new) and brownfield (existing) projects. If you are not familiar with OAuth 2.0 and are working on a greenfield project, we recommend evaluating if OAuth 2.0 really serves your purpose. Knowledge of OAuth 2.0 is imperative in understanding what Hydra does and how it works. The official repository is located at https://github.com/ory/hydra ### Important REST API Documentation Notes The swagger generator used to create this documentation does currently not support example responses. To see request and response payloads click on **\"Show JSON schema\"**: ![Enable JSON Schema on Apiary](https://storage.googleapis.com/ory.am/hydra/json-schema.png) The API documentation always refers to the latest tagged version of ORY Hydra. For previous API documentations, please refer to https://github.com/ory/hydra/blob/<tag-id>/docs/api.swagger.yaml - for example: 0.9.13: https://github.com/ory/hydra/blob/v0.9.13/docs/api.swagger.yaml 0.8.1: https://github.com/ory/hydra/blob/v0.8.1/docs/api.swagger.yaml
Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. Keep in mind that this document reflects the latest branch, always. Support for versioned documentation is coming in the future.

## Overview
This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.

- API version: Latest
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.GoClientCodegen
For more information, please visit [https://www.ory.am](https://www.ory.am)
For more information, please visit [https://www.ory.sh](https://www.ory.sh)

## Installation
Put the package under your project folder and add the following in import:
Expand All @@ -22,10 +22,10 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*HealthApi* | [**GetInstanceStatus**](docs/HealthApi.md#getinstancestatus) | **Get** /health/status | Check health status of this instance
*HealthApi* | [**GetInstanceStatus**](docs/HealthApi.md#getinstancestatus) | **Get** /health/status | Check the Health Status
*JsonWebKeyApi* | [**CreateJsonWebKeySet**](docs/JsonWebKeyApi.md#createjsonwebkeyset) | **Post** /keys/{set} | Generate a new JSON Web Key
*JsonWebKeyApi* | [**DeleteJsonWebKey**](docs/JsonWebKeyApi.md#deletejsonwebkey) | **Delete** /keys/{set}/{kid} | Delete a JSON Web Key
*JsonWebKeyApi* | [**DeleteJsonWebKeySet**](docs/JsonWebKeyApi.md#deletejsonwebkeyset) | **Delete** /keys/{set} | Delete a JSON Web Key
*JsonWebKeyApi* | [**DeleteJsonWebKeySet**](docs/JsonWebKeyApi.md#deletejsonwebkeyset) | **Delete** /keys/{set} | Delete a JSON Web Key Set
*JsonWebKeyApi* | [**GetJsonWebKey**](docs/JsonWebKeyApi.md#getjsonwebkey) | **Get** /keys/{set}/{kid} | Retrieve a JSON Web Key
*JsonWebKeyApi* | [**GetJsonWebKeySet**](docs/JsonWebKeyApi.md#getjsonwebkeyset) | **Get** /keys/{set} | Retrieve a JSON Web Key Set
*JsonWebKeyApi* | [**UpdateJsonWebKey**](docs/JsonWebKeyApi.md#updatejsonwebkey) | **Put** /keys/{set}/{kid} | Update a JSON Web Key
Expand All @@ -34,7 +34,7 @@ Class | Method | HTTP request | Description
*OAuth2Api* | [**CreateOAuth2Client**](docs/OAuth2Api.md#createoauth2client) | **Post** /clients | Create an OAuth 2.0 client
*OAuth2Api* | [**DeleteOAuth2Client**](docs/OAuth2Api.md#deleteoauth2client) | **Delete** /clients/{id} | Deletes an OAuth 2.0 Client
*OAuth2Api* | [**FlushInactiveOAuth2Tokens**](docs/OAuth2Api.md#flushinactiveoauth2tokens) | **Post** /oauth2/flush | Flush Expired OAuth2 Access Tokens
*OAuth2Api* | [**GetOAuth2Client**](docs/OAuth2Api.md#getoauth2client) | **Get** /clients/{id} | Retrieve an OAuth 2.0 Client.
*OAuth2Api* | [**GetOAuth2Client**](docs/OAuth2Api.md#getoauth2client) | **Get** /clients/{id} | Get an OAuth 2.0 Client.
*OAuth2Api* | [**GetOAuth2ConsentRequest**](docs/OAuth2Api.md#getoauth2consentrequest) | **Get** /oauth2/consent/requests/{id} | Receive consent request information
*OAuth2Api* | [**GetWellKnown**](docs/OAuth2Api.md#getwellknown) | **Get** /.well-known/openid-configuration | Server well known configuration
*OAuth2Api* | [**IntrospectOAuth2Token**](docs/OAuth2Api.md#introspectoauth2token) | **Post** /oauth2/introspect | Introspect OAuth2 tokens
Expand All @@ -45,7 +45,7 @@ Class | Method | HTTP request | Description
*OAuth2Api* | [**RevokeOAuth2Token**](docs/OAuth2Api.md#revokeoauth2token) | **Post** /oauth2/revoke | Revoke OAuth2 tokens
*OAuth2Api* | [**UpdateOAuth2Client**](docs/OAuth2Api.md#updateoauth2client) | **Put** /clients/{id} | Update an OAuth 2.0 Client
*OAuth2Api* | [**Userinfo**](docs/OAuth2Api.md#userinfo) | **Post** /userinfo | OpenID Connect Userinfo
*OAuth2Api* | [**WellKnown**](docs/OAuth2Api.md#wellknown) | **Get** /.well-known/jwks.json | Get list of well known JSON Web Keys
*OAuth2Api* | [**WellKnown**](docs/OAuth2Api.md#wellknown) | **Get** /.well-known/jwks.json | Get Well-Known JSON Web Keys
*PolicyApi* | [**CreatePolicy**](docs/PolicyApi.md#createpolicy) | **Post** /policies | Create an Access Control Policy
*PolicyApi* | [**DeletePolicy**](docs/PolicyApi.md#deletepolicy) | **Delete** /policies/{id} | Delete an Access Control Policy
*PolicyApi* | [**GetPolicy**](docs/PolicyApi.md#getpolicy) | **Get** /policies/{id} | Get an Access Control Policy
Expand Down Expand Up @@ -74,7 +74,6 @@ Class | Method | HTTP request | Description
- [GroupMembers](docs/GroupMembers.md)
- [Handler](docs/Handler.md)
- [InlineResponse200](docs/InlineResponse200.md)
- [InlineResponse2001](docs/InlineResponse2001.md)
- [InlineResponse401](docs/InlineResponse401.md)
- [JoseWebKeySetRequest](docs/JoseWebKeySetRequest.md)
- [JsonWebKey](docs/JsonWebKey.md)
Expand All @@ -85,6 +84,7 @@ Class | Method | HTTP request | Description
- [OAuth2Client](docs/OAuth2Client.md)
- [OAuth2ConsentRequest](docs/OAuth2ConsentRequest.md)
- [OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md)
- [OauthTokenResponse](docs/OauthTokenResponse.md)
- [Policy](docs/Policy.md)
- [PolicyConditions](docs/PolicyConditions.md)
- [RawMessage](docs/RawMessage.md)
Expand All @@ -101,20 +101,13 @@ Class | Method | HTTP request | Description
- [SwaggerJwkUpdateSetKey](docs/SwaggerJwkUpdateSetKey.md)
- [SwaggerListPolicyParameters](docs/SwaggerListPolicyParameters.md)
- [SwaggerListPolicyResponse](docs/SwaggerListPolicyResponse.md)
- [SwaggerOAuthConsentRequest](docs/SwaggerOAuthConsentRequest.md)
- [SwaggerOAuthConsentRequestPayload](docs/SwaggerOAuthConsentRequestPayload.md)
- [SwaggerOAuthIntrospectionRequest](docs/SwaggerOAuthIntrospectionRequest.md)
- [SwaggerOAuthIntrospectionResponse](docs/SwaggerOAuthIntrospectionResponse.md)
- [SwaggerOAuthTokenResponse](docs/SwaggerOAuthTokenResponse.md)
- [SwaggerOAuthTokenResponseBody](docs/SwaggerOAuthTokenResponseBody.md)
- [SwaggerRejectConsentRequest](docs/SwaggerRejectConsentRequest.md)
- [SwaggerRevokeOAuth2TokenParameters](docs/SwaggerRevokeOAuth2TokenParameters.md)
- [SwaggerUpdatePolicyParameters](docs/SwaggerUpdatePolicyParameters.md)
- [SwaggerWardenAccessRequestResponseParameters](docs/SwaggerWardenAccessRequestResponseParameters.md)
- [SwaggerWardenTokenAccessRequestResponse](docs/SwaggerWardenTokenAccessRequestResponse.md)
- [SwaggeruserinfoResponse](docs/SwaggeruserinfoResponse.md)
- [SwaggeruserinfoResponsePayload](docs/SwaggeruserinfoResponsePayload.md)
- [TokenAllowedRequest](docs/TokenAllowedRequest.md)
- [UserinfoResponse](docs/UserinfoResponse.md)
- [WardenAccessRequest](docs/WardenAccessRequest.md)
- [WardenAccessRequestResponse](docs/WardenAccessRequestResponse.md)
- [WardenTokenAccessRequest](docs/WardenTokenAccessRequest.md)
Expand Down
Loading

0 comments on commit 4125eab

Please sign in to comment.