From 8b1fc934d3fb34188523cfaf2dad3a9c61f8c1b0 Mon Sep 17 00:00:00 2001
From: aeneasr <aeneas@ory.sh>
Date: Mon, 19 Aug 2019 21:19:36 +0200
Subject: [PATCH] docs: Document prometheus API endpoint

---
 docs/api.swagger.json                         |  30 ++++-
 metrics/prometheus/doc.go                     |  22 ++++
 sdk/go/hydra/client/admin/admin_client.go     |  43 +++++++
 .../client/admin/prometheus_parameters.go     | 113 ++++++++++++++++++
 .../client/admin/prometheus_responses.go      |  56 +++++++++
 sdk/go/hydra/client/public/public_client.go   |  11 +-
 .../hydra/models/swagger_json_web_key_set.go  |   2 +-
 sdk/java/hydra-client-resttemplate/README.md  |   4 +-
 .../docs/AdminApi.md                          |  43 ++++++-
 .../docs/PublicApi.md                         |   4 +-
 .../java/com/github/ory/hydra/ApiClient.java  |   2 +-
 .../com/github/ory/hydra/api/AdminApi.java    |  33 ++++-
 .../com/github/ory/hydra/api/PublicApi.java   |   6 +-
 .../com/github/ory/hydra/auth/ApiKeyAuth.java |   2 +-
 .../github/ory/hydra/auth/HttpBasicAuth.java  |   2 +-
 .../java/com/github/ory/hydra/auth/OAuth.java |   2 +-
 .../ory/hydra/model/AcceptConsentRequest.java |   2 +-
 .../ory/hydra/model/AcceptLoginRequest.java   |   2 +-
 .../ory/hydra/model/CompletedRequest.java     |   2 +-
 .../ory/hydra/model/ConsentRequest.java       |   2 +-
 .../hydra/model/ConsentRequestSession.java    |   2 +-
 .../FlushInactiveOAuth2TokensRequest.java     |   2 +-
 .../github/ory/hydra/model/GenericError.java  |   2 +-
 .../ory/hydra/model/HealthNotReadyStatus.java |   2 +-
 .../github/ory/hydra/model/HealthStatus.java  |   2 +-
 .../github/ory/hydra/model/JSONWebKey.java    |   2 +-
 .../github/ory/hydra/model/JSONWebKeySet.java |   2 +-
 .../model/JsonWebKeySetGeneratorRequest.java  |   2 +-
 .../github/ory/hydra/model/LoginRequest.java  |   2 +-
 .../github/ory/hydra/model/LogoutRequest.java |   2 +-
 .../github/ory/hydra/model/OAuth2Client.java  |   2 +-
 .../hydra/model/OAuth2TokenIntrospection.java |   2 +-
 .../ory/hydra/model/Oauth2TokenResponse.java  |   2 +-
 .../ory/hydra/model/OauthTokenResponse.java   |   2 +-
 .../ory/hydra/model/OpenIDConnectContext.java |   2 +-
 .../hydra/model/PreviousConsentSession.java   |   2 +-
 .../github/ory/hydra/model/RejectRequest.java |   2 +-
 .../ory/hydra/model/UserinfoResponse.java     |   2 +-
 .../com/github/ory/hydra/model/Version.java   |   2 +-
 .../com/github/ory/hydra/model/WellKnown.java |   2 +-
 sdk/js/swagger/README.md                      |   4 +-
 sdk/js/swagger/docs/AdminApi.md               |  43 ++++++-
 sdk/js/swagger/docs/PublicApi.md              |   4 +-
 sdk/js/swagger/src/api/AdminApi.js            |  40 ++++++-
 sdk/js/swagger/src/api/PublicApi.js           |   4 +-
 sdk/php/swagger/README.md                     |   4 +-
 sdk/php/swagger/docs/Api/AdminApi.md          |  43 ++++++-
 sdk/php/swagger/docs/Api/PublicApi.md         |   4 +-
 sdk/php/swagger/lib/Api/AdminApi.php          |  68 +++++++++++
 49 files changed, 579 insertions(+), 58 deletions(-)
 create mode 100644 metrics/prometheus/doc.go
 create mode 100644 sdk/go/hydra/client/admin/prometheus_parameters.go
 create mode 100644 sdk/go/hydra/client/admin/prometheus_responses.go

diff --git a/docs/api.swagger.json b/docs/api.swagger.json
index 3acedc7d8fa..97e5fc45953 100644
--- a/docs/api.swagger.json
+++ b/docs/api.swagger.json
@@ -54,7 +54,7 @@
     },
     "/.well-known/openid-configuration": {
       "get": {
-        "description": "The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll\nyour own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this\nflow at https://openid.net/specs/openid-connect-discovery-1_0.html",
+        "description": "The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll\nyour own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this\nflow at https://openid.net/specs/openid-connect-discovery-1_0.html .\n\nPopular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others.\nFor a full list of clients go here: https://openid.net/developers/certified/",
         "produces": [
           "application/json"
         ],
@@ -807,6 +807,24 @@
         }
       }
     },
+    "/metrics/prometheus": {
+      "get": {
+        "description": "```\nmetadata:\nannotations:\nprometheus.io/port: \"4445\"\nprometheus.io/path: \"/metrics/prometheus\"\n```",
+        "produces": [
+          "plain/text"
+        ],
+        "tags": [
+          "admin"
+        ],
+        "summary": "Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to\nyour deployment like so:",
+        "operationId": "prometheus",
+        "responses": {
+          "200": {
+            "$ref": "#/responses/emptyResponse"
+          }
+        }
+      }
+    },
     "/oauth2/auth": {
       "get": {
         "description": "This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows.\nOAuth2 is a very popular protocol and a library for your programming language will exists.\n\nTo learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749",
@@ -1550,7 +1568,7 @@
             "oauth2": []
           }
         ],
-        "description": "The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token\nis neither expired nor revoked. If a token is active, additional information on the token will be included. You can\nset additional data for a token by setting `accessTokenExtra` during the consent flow.",
+        "description": "The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token\nis neither expired nor revoked. If a token is active, additional information on the token will be included. You can\nset additional data for a token by setting `accessTokenExtra` during the consent flow.\n\nFor more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).",
         "consumes": [
           "application/x-www-form-urlencoded"
         ],
@@ -1757,7 +1775,7 @@
             "oauth2": []
           }
         ],
-        "description": "This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 access token.\nThe endpoint implements http://openid.net/specs/openid-connect-core-1_0.html#UserInfo .",
+        "description": "This endpoint returns the payload of the ID Token, including the idTokenExtra values, of\nthe provided OAuth 2.0 Access Token.\n\nFor more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).",
         "produces": [
           "application/json"
         ],
@@ -1922,7 +1940,6 @@
     },
     "JSONWebKeySet": {
       "type": "object",
-      "title": "JSONWebKeySet represents a JWK Set object.",
       "properties": {
         "keys": {
           "description": "The value of the \"keys\" parameter is an array of JWK values.  By\ndefault, the order of the JWK values within the array does not imply\nan order of preference among them, although applications of JWK Sets\ncan choose to assign a meaning to the order for their purposes, if\ndesired.",
@@ -1934,7 +1951,7 @@
         }
       },
       "x-go-name": "swaggerJSONWebKeySet",
-      "x-go-package": "gopkg.in/square/go-jose.v2"
+      "x-go-package": "github.com/ory/hydra/jwk"
     },
     "PreviousConsentSession": {
       "description": "The response used to return used consent requests\nsame as HandledLoginRequest, just with consent_request exposed as json",
@@ -3094,7 +3111,8 @@
       "authorizationUrl": "/oauth2/auth",
       "tokenUrl": "/oauth2/token",
       "scopes": {
-        "offline": "A scope required when requesting refresh tokens",
+        "offline": "A scope required when requesting refresh tokens (alias for `offline`)",
+        "offline_access": "A scope required when requesting refresh tokens",
         "openid": "Request an OpenID Connect ID Token"
       }
     }
diff --git a/metrics/prometheus/doc.go b/metrics/prometheus/doc.go
new file mode 100644
index 00000000000..70e087022a1
--- /dev/null
+++ b/metrics/prometheus/doc.go
@@ -0,0 +1,22 @@
+package prometheus
+
+// Outputs Prometheus metrics
+//
+// swagger:route GET /metrics/prometheus admin prometheus
+//
+// Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to
+// your deployment like so:
+//
+// ```
+// metadata:
+//  annotations:
+//    prometheus.io/port: "4445"
+//      prometheus.io/path: "/metrics/prometheus"
+// ```
+//
+//     Produces:
+//     - plain/text
+//
+//     Responses:
+//       200: emptyResponse
+func swaggerPublicPrometheus() {}
diff --git a/sdk/go/hydra/client/admin/admin_client.go b/sdk/go/hydra/client/admin/admin_client.go
index 9d4d0475d4f..b09df2d48d8 100644
--- a/sdk/go/hydra/client/admin/admin_client.go
+++ b/sdk/go/hydra/client/admin/admin_client.go
@@ -675,6 +675,8 @@ IntrospectOAuth2Token introspects o auth2 tokens
 The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token
 is neither expired nor revoked. If a token is active, additional information on the token will be included. You can
 set additional data for a token by setting `accessTokenExtra` during the consent flow.
+
+For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
 */
 func (a *Client) IntrospectOAuth2Token(params *IntrospectOAuth2TokenParams, authInfo runtime.ClientAuthInfoWriter) (*IntrospectOAuth2TokenOK, error) {
 	// TODO: Validate the params before sending
@@ -829,6 +831,47 @@ func (a *Client) ListSubjectConsentSessions(params *ListSubjectConsentSessionsPa
 	panic(msg)
 }
 
+/*
+Prometheus gets snapshot metrics from the hydra service if you re using k8s you can then add annotations to your deployment like so
+
+```
+metadata:
+annotations:
+prometheus.io/port: "4445"
+prometheus.io/path: "/metrics/prometheus"
+```
+*/
+func (a *Client) Prometheus(params *PrometheusParams) (*PrometheusOK, error) {
+	// TODO: Validate the params before sending
+	if params == nil {
+		params = NewPrometheusParams()
+	}
+
+	result, err := a.transport.Submit(&runtime.ClientOperation{
+		ID:                 "prometheus",
+		Method:             "GET",
+		PathPattern:        "/metrics/prometheus",
+		ProducesMediaTypes: []string{"plain/text"},
+		ConsumesMediaTypes: []string{"application/json", "application/x-www-form-urlencoded"},
+		Schemes:            []string{"http", "https"},
+		Params:             params,
+		Reader:             &PrometheusReader{formats: a.formats},
+		Context:            params.Context,
+		Client:             params.HTTPClient,
+	})
+	if err != nil {
+		return nil, err
+	}
+	success, ok := result.(*PrometheusOK)
+	if ok {
+		return success, nil
+	}
+	// unexpected success response
+	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
+	msg := fmt.Sprintf("unexpected success response for prometheus: API contract not enforced by server. Client expected to get an error, but got: %T", result)
+	panic(msg)
+}
+
 /*
 RejectConsentRequest rejects an consent request
 
diff --git a/sdk/go/hydra/client/admin/prometheus_parameters.go b/sdk/go/hydra/client/admin/prometheus_parameters.go
new file mode 100644
index 00000000000..593fb9f9932
--- /dev/null
+++ b/sdk/go/hydra/client/admin/prometheus_parameters.go
@@ -0,0 +1,113 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package admin
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+	"context"
+	"net/http"
+	"time"
+
+	"github.com/go-openapi/errors"
+	"github.com/go-openapi/runtime"
+	cr "github.com/go-openapi/runtime/client"
+
+	strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewPrometheusParams creates a new PrometheusParams object
+// with the default values initialized.
+func NewPrometheusParams() *PrometheusParams {
+
+	return &PrometheusParams{
+
+		timeout: cr.DefaultTimeout,
+	}
+}
+
+// NewPrometheusParamsWithTimeout creates a new PrometheusParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewPrometheusParamsWithTimeout(timeout time.Duration) *PrometheusParams {
+
+	return &PrometheusParams{
+
+		timeout: timeout,
+	}
+}
+
+// NewPrometheusParamsWithContext creates a new PrometheusParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewPrometheusParamsWithContext(ctx context.Context) *PrometheusParams {
+
+	return &PrometheusParams{
+
+		Context: ctx,
+	}
+}
+
+// NewPrometheusParamsWithHTTPClient creates a new PrometheusParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewPrometheusParamsWithHTTPClient(client *http.Client) *PrometheusParams {
+
+	return &PrometheusParams{
+		HTTPClient: client,
+	}
+}
+
+/*PrometheusParams contains all the parameters to send to the API endpoint
+for the prometheus operation typically these are written to a http.Request
+*/
+type PrometheusParams struct {
+	timeout    time.Duration
+	Context    context.Context
+	HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the prometheus params
+func (o *PrometheusParams) WithTimeout(timeout time.Duration) *PrometheusParams {
+	o.SetTimeout(timeout)
+	return o
+}
+
+// SetTimeout adds the timeout to the prometheus params
+func (o *PrometheusParams) SetTimeout(timeout time.Duration) {
+	o.timeout = timeout
+}
+
+// WithContext adds the context to the prometheus params
+func (o *PrometheusParams) WithContext(ctx context.Context) *PrometheusParams {
+	o.SetContext(ctx)
+	return o
+}
+
+// SetContext adds the context to the prometheus params
+func (o *PrometheusParams) SetContext(ctx context.Context) {
+	o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the prometheus params
+func (o *PrometheusParams) WithHTTPClient(client *http.Client) *PrometheusParams {
+	o.SetHTTPClient(client)
+	return o
+}
+
+// SetHTTPClient adds the HTTPClient to the prometheus params
+func (o *PrometheusParams) SetHTTPClient(client *http.Client) {
+	o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *PrometheusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+	if err := r.SetTimeout(o.timeout); err != nil {
+		return err
+	}
+	var res []error
+
+	if len(res) > 0 {
+		return errors.CompositeValidationError(res...)
+	}
+	return nil
+}
diff --git a/sdk/go/hydra/client/admin/prometheus_responses.go b/sdk/go/hydra/client/admin/prometheus_responses.go
new file mode 100644
index 00000000000..2f01bca193a
--- /dev/null
+++ b/sdk/go/hydra/client/admin/prometheus_responses.go
@@ -0,0 +1,56 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package admin
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+	"fmt"
+
+	"github.com/go-openapi/runtime"
+
+	strfmt "github.com/go-openapi/strfmt"
+)
+
+// PrometheusReader is a Reader for the Prometheus structure.
+type PrometheusReader struct {
+	formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *PrometheusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+	switch response.Code() {
+	case 200:
+		result := NewPrometheusOK()
+		if err := result.readResponse(response, consumer, o.formats); err != nil {
+			return nil, err
+		}
+		return result, nil
+
+	default:
+		return nil, runtime.NewAPIError("unknown error", response, response.Code())
+	}
+}
+
+// NewPrometheusOK creates a PrometheusOK with default headers values
+func NewPrometheusOK() *PrometheusOK {
+	return &PrometheusOK{}
+}
+
+/*PrometheusOK handles this case with default header values.
+
+Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
+typically 201.
+*/
+type PrometheusOK struct {
+}
+
+func (o *PrometheusOK) Error() string {
+	return fmt.Sprintf("[GET /metrics/prometheus][%d] prometheusOK ", 200)
+}
+
+func (o *PrometheusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+	return nil
+}
diff --git a/sdk/go/hydra/client/public/public_client.go b/sdk/go/hydra/client/public/public_client.go
index 8878396b3c1..179c063a0e6 100644
--- a/sdk/go/hydra/client/public/public_client.go
+++ b/sdk/go/hydra/client/public/public_client.go
@@ -63,7 +63,10 @@ DiscoverOpenIDConfiguration opens ID connect discovery
 
 The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll
 your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this
-flow at https://openid.net/specs/openid-connect-discovery-1_0.html
+flow at https://openid.net/specs/openid-connect-discovery-1_0.html .
+
+Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others.
+For a full list of clients go here: https://openid.net/developers/certified/
 */
 func (a *Client) DiscoverOpenIDConfiguration(params *DiscoverOpenIDConfigurationParams) (*DiscoverOpenIDConfigurationOK, error) {
 	// TODO: Validate the params before sending
@@ -258,8 +261,10 @@ func (a *Client) RevokeOAuth2Token(params *RevokeOAuth2TokenParams, authInfo run
 /*
 Userinfo opens ID connect userinfo
 
-This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 access token.
-The endpoint implements http://openid.net/specs/openid-connect-core-1_0.html#UserInfo .
+This endpoint returns the payload of the ID Token, including the idTokenExtra values, of
+the provided OAuth 2.0 Access Token.
+
+For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
 */
 func (a *Client) Userinfo(params *UserinfoParams, authInfo runtime.ClientAuthInfoWriter) (*UserinfoOK, error) {
 	// TODO: Validate the params before sending
diff --git a/sdk/go/hydra/models/swagger_json_web_key_set.go b/sdk/go/hydra/models/swagger_json_web_key_set.go
index 62600a19445..09c341ab3a4 100644
--- a/sdk/go/hydra/models/swagger_json_web_key_set.go
+++ b/sdk/go/hydra/models/swagger_json_web_key_set.go
@@ -14,7 +14,7 @@ import (
 	"github.com/go-openapi/swag"
 )
 
-// SwaggerJSONWebKeySet JSONWebKeySet represents a JWK Set object.
+// SwaggerJSONWebKeySet swagger JSON web key set
 // swagger:model swaggerJSONWebKeySet
 type SwaggerJSONWebKeySet struct {
 
diff --git a/sdk/java/hydra-client-resttemplate/README.md b/sdk/java/hydra-client-resttemplate/README.md
index b95932d8ca3..2847944e3e8 100644
--- a/sdk/java/hydra-client-resttemplate/README.md
+++ b/sdk/java/hydra-client-resttemplate/README.md
@@ -111,6 +111,7 @@ Class | Method | HTTP request | Description
 *AdminApi* | [**isInstanceAlive**](docs/AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check alive status
 *AdminApi* | [**listOAuth2Clients**](docs/AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients
 *AdminApi* | [**listSubjectConsentSessions**](docs/AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
+*AdminApi* | [**prometheus**](docs/AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
 *AdminApi* | [**rejectConsentRequest**](docs/AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
 *AdminApi* | [**rejectLoginRequest**](docs/AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
 *AdminApi* | [**rejectLogoutRequest**](docs/AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
@@ -170,7 +171,8 @@ Authentication schemes defined for the API:
 - **Flow**: accessCode
 - **Authorization URL**: /oauth2/auth
 - **Scopes**: 
-  - offline: A scope required when requesting refresh tokens
+  - offline: A scope required when requesting refresh tokens (alias for &#x60;offline&#x60;)
+  - offline_access: A scope required when requesting refresh tokens
   - openid: Request an OpenID Connect ID Token
 
 
diff --git a/sdk/java/hydra-client-resttemplate/docs/AdminApi.md b/sdk/java/hydra-client-resttemplate/docs/AdminApi.md
index d10ec35f609..e24b4dd5621 100644
--- a/sdk/java/hydra-client-resttemplate/docs/AdminApi.md
+++ b/sdk/java/hydra-client-resttemplate/docs/AdminApi.md
@@ -24,6 +24,7 @@ Method | HTTP request | Description
 [**isInstanceAlive**](AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check alive status
 [**listOAuth2Clients**](AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients
 [**listSubjectConsentSessions**](AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
+[**prometheus**](AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
 [**rejectConsentRequest**](AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
 [**rejectLoginRequest**](AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
 [**rejectLogoutRequest**](AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
@@ -762,7 +763,7 @@ No authorization required
 
 Introspect OAuth2 tokens
 
-The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.
+The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.  For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
 
 ### Example
 ```java
@@ -949,6 +950,46 @@ No authorization required
  - **Content-Type**: application/json
  - **Accept**: application/json
 
+<a name="prometheus"></a>
+# **prometheus**
+> prometheus()
+
+Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
+
+&#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: \&quot;4445\&quot; prometheus.io/path: \&quot;/metrics/prometheus\&quot; &#x60;&#x60;&#x60;
+
+### Example
+```java
+// Import classes:
+//import com.github.ory.hydra.ApiException;
+//import com.github.ory.hydra.api.AdminApi;
+
+
+AdminApi apiInstance = new AdminApi();
+try {
+    apiInstance.prometheus();
+} catch (ApiException e) {
+    System.err.println("Exception when calling AdminApi#prometheus");
+    e.printStackTrace();
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
+ - **Accept**: plain/text
+
 <a name="rejectConsentRequest"></a>
 # **rejectConsentRequest**
 > CompletedRequest rejectConsentRequest(consentChallenge, body)
diff --git a/sdk/java/hydra-client-resttemplate/docs/PublicApi.md b/sdk/java/hydra-client-resttemplate/docs/PublicApi.md
index 1c47a10fda0..e49620d4eb6 100644
--- a/sdk/java/hydra-client-resttemplate/docs/PublicApi.md
+++ b/sdk/java/hydra-client-resttemplate/docs/PublicApi.md
@@ -60,7 +60,7 @@ No authorization required
 
 OpenID Connect Discovery
 
-The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html
+The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html .  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
 
 ### Example
 ```java
@@ -303,7 +303,7 @@ null (empty response body)
 
 OpenID Connect Userinfo
 
-This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 access token. The endpoint implements http://openid.net/specs/openid-connect-core-1_0.html#UserInfo .
+This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token.  For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
 
 ### Example
 ```java
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java
index fcbd703984b..663f219983c 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java
@@ -50,7 +50,7 @@
 import com.github.ory.hydra.auth.ApiKeyAuth;
 import com.github.ory.hydra.auth.OAuth;
 
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 @Component("com.github.ory.hydra.ApiClient")
 public class ApiClient {
     public enum CollectionFormat {
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java
index e43cc4625c6..5bded1f950d 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java
@@ -39,7 +39,7 @@
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 @Component("com.github.ory.hydra.api.AdminApi")
 public class AdminApi {
     private ApiClient apiClient;
@@ -713,7 +713,7 @@ public Version getVersion() throws RestClientException {
     }
     /**
      * Introspect OAuth2 tokens
-     * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.
+     * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.  For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
      * <p><b>200</b> - oAuth2TokenIntrospection
      * <p><b>401</b> - genericError
      * <p><b>500</b> - genericError
@@ -863,6 +863,35 @@ public List<PreviousConsentSession> listSubjectConsentSessions(String subject) t
         ParameterizedTypeReference<List<PreviousConsentSession>> returnType = new ParameterizedTypeReference<List<PreviousConsentSession>>() {};
         return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
     }
+    /**
+     * Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
+     * &#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: \&quot;4445\&quot; prometheus.io/path: \&quot;/metrics/prometheus\&quot; &#x60;&#x60;&#x60;
+     * <p><b>200</b> - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.
+     * @throws RestClientException if an error occurs while attempting to invoke the API
+     */
+    public void prometheus() throws RestClientException {
+        Object postBody = null;
+        
+        String path = UriComponentsBuilder.fromPath("/metrics/prometheus").build().toUriString();
+        
+        final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
+        final HttpHeaders headerParams = new HttpHeaders();
+        final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
+
+        final String[] accepts = { 
+            "plain/text"
+        };
+        final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);
+        final String[] contentTypes = { 
+            "application/json", "application/x-www-form-urlencoded"
+        };
+        final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
+
+        String[] authNames = new String[] {  };
+
+        ParameterizedTypeReference<Void> returnType = new ParameterizedTypeReference<Void>() {};
+        apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
+    }
     /**
      * Reject an consent request
      * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf.  The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\&quot;Application my-dropbox-app wants write access to all your private files\&quot;).  The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.  This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java
index 60111424ab4..e3995d9c4c7 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java
@@ -29,7 +29,7 @@
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 @Component("com.github.ory.hydra.api.PublicApi")
 public class PublicApi {
     private ApiClient apiClient;
@@ -82,7 +82,7 @@ public void disconnectUser() throws RestClientException {
     }
     /**
      * OpenID Connect Discovery
-     * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html
+     * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html .  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
      * <p><b>200</b> - wellKnown
      * <p><b>401</b> - genericError
      * <p><b>500</b> - genericError
@@ -266,7 +266,7 @@ public void revokeOAuth2Token(String token) throws RestClientException {
     }
     /**
      * OpenID Connect Userinfo
-     * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 access token. The endpoint implements http://openid.net/specs/openid-connect-core-1_0.html#UserInfo .
+     * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token.  For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
      * <p><b>200</b> - userinfoResponse
      * <p><b>401</b> - genericError
      * <p><b>500</b> - genericError
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java
index 689bc4a7a85..d2d8a8e0570 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java
@@ -3,7 +3,7 @@
 import org.springframework.http.HttpHeaders;
 import org.springframework.util.MultiValueMap;
 
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class ApiKeyAuth implements Authentication {
     private final String location;
     private final String paramName;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java
index d3c5c964476..264ec8b2631 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java
@@ -7,7 +7,7 @@
 import org.springframework.util.Base64Utils;
 import org.springframework.util.MultiValueMap;
 
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class HttpBasicAuth implements Authentication {
     private String username;
     private String password;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java
index c265328cd35..b6a515b296a 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java
@@ -3,7 +3,7 @@
 import org.springframework.http.HttpHeaders;
 import org.springframework.util.MultiValueMap;
 
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class OAuth implements Authentication {
     private String accessToken;
 
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java
index c21aed211e6..4354a73c999 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java
@@ -26,7 +26,7 @@
 /**
  * AcceptConsentRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class AcceptConsentRequest {
   @JsonProperty("grant_access_token_audience")
   private List<String> grantAccessTokenAudience = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java
index 420e58597fd..659a1ebe074 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java
@@ -26,7 +26,7 @@
 /**
  * AcceptLoginRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class AcceptLoginRequest {
   @JsonProperty("acr")
   private String acr = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java
index 4e858508c19..a6ac5098d9a 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java
@@ -23,7 +23,7 @@
 /**
  * CompletedRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class CompletedRequest {
   @JsonProperty("redirect_to")
   private String redirectTo = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java
index b47b7d1ea69..317e6d3fc64 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java
@@ -29,7 +29,7 @@
 /**
  * ConsentRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class ConsentRequest {
   @JsonProperty("acr")
   private String acr = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java
index 4afff58c998..3d189aafaf1 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java
@@ -26,7 +26,7 @@
 /**
  * ConsentRequestSession
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class ConsentRequestSession {
   @JsonProperty("access_token")
   private Map<String, Object> accessToken = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java
index ccf80ecf681..e7b907c74c8 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java
@@ -24,7 +24,7 @@
 /**
  * FlushInactiveOAuth2TokensRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class FlushInactiveOAuth2TokensRequest {
   @JsonProperty("notAfter")
   private DateTime notAfter = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java
index 2090e5d348b..f3be14dcac7 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java
@@ -24,7 +24,7 @@
  * Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.
  */
 @ApiModel(description = "Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.")
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class GenericError {
   @JsonProperty("debug")
   private String debug = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java
index 906852f8807..9729e3837d7 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java
@@ -26,7 +26,7 @@
 /**
  * HealthNotReadyStatus
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class HealthNotReadyStatus {
   @JsonProperty("errors")
   private Map<String, String> errors = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java
index 4e93d6c8191..6a955fd7dc8 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java
@@ -23,7 +23,7 @@
 /**
  * HealthStatus
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class HealthStatus {
   @JsonProperty("status")
   private String status = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java
index 34aa65b9713..b0b6e4b7b27 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java
@@ -25,7 +25,7 @@
 /**
  * JSONWebKey
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class JSONWebKey {
   @JsonProperty("alg")
   private String alg = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java
index 8fd7cd59ef8..af27ec892f0 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java
@@ -26,7 +26,7 @@
 /**
  * JSONWebKeySet
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class JSONWebKeySet {
   @JsonProperty("keys")
   private List<JSONWebKey> keys = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java
index ef1e41809c9..bb460e571d8 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java
@@ -23,7 +23,7 @@
 /**
  * JsonWebKeySetGeneratorRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class JsonWebKeySetGeneratorRequest {
   @JsonProperty("alg")
   private String alg = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java
index 504898923b1..6aab5f4a36a 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java
@@ -27,7 +27,7 @@
 /**
  * LoginRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class LoginRequest {
   @JsonProperty("challenge")
   private String challenge = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java
index 786303f6c83..a657a0b46c9 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java
@@ -23,7 +23,7 @@
 /**
  * LogoutRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class LogoutRequest {
   @JsonProperty("request_url")
   private String requestUrl = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java
index 5898a235cb9..0d0a7a02058 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java
@@ -27,7 +27,7 @@
 /**
  * OAuth2Client
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class OAuth2Client {
   @JsonProperty("allowed_cors_origins")
   private List<String> allowedCorsOrigins = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java
index c452ad52a51..175a9eb0977 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java
@@ -28,7 +28,7 @@
  * https://tools.ietf.org/html/rfc7662
  */
 @ApiModel(description = "https://tools.ietf.org/html/rfc7662")
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class OAuth2TokenIntrospection {
   @JsonProperty("active")
   private Boolean active = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java
index 0351c8e9e95..16d5fae0d55 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java
@@ -24,7 +24,7 @@
  * The Access Token Response
  */
 @ApiModel(description = "The Access Token Response")
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class Oauth2TokenResponse {
   @JsonProperty("access_token")
   private String accessToken = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java
index 11aab53424f..6c85845fd7e 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java
@@ -24,7 +24,7 @@
  * The token response
  */
 @ApiModel(description = "The token response")
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class OauthTokenResponse {
   @JsonProperty("access_token")
   private String accessToken = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java
index f5ea6c41a31..1d2d96261f6 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java
@@ -27,7 +27,7 @@
 /**
  * OpenIDConnectContext
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class OpenIDConnectContext {
   @JsonProperty("acr_values")
   private List<String> acrValues = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java
index 7f1b754f0ea..0f50324c065 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java
@@ -28,7 +28,7 @@
  * The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json
  */
 @ApiModel(description = "The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json")
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class PreviousConsentSession {
   @JsonProperty("consent_request")
   private ConsentRequest consentRequest = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java
index 61513f804c6..a8348af11a3 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java
@@ -23,7 +23,7 @@
 /**
  * RejectRequest
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class RejectRequest {
   @JsonProperty("error")
   private String error = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java
index 89babc994ac..273e71b0b4f 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java
@@ -24,7 +24,7 @@
  * The userinfo response
  */
 @ApiModel(description = "The userinfo response")
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class UserinfoResponse {
   @JsonProperty("birthdate")
   private String birthdate = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java
index c4485671949..54aa25bd91f 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java
@@ -23,7 +23,7 @@
 /**
  * Version
  */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class Version {
   @JsonProperty("version")
   private String version = null;
diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java
index 266e2e92657..9075b409bfb 100644
--- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java
+++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java
@@ -26,7 +26,7 @@
  * It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others.
  */
 @ApiModel(description = "It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others.")
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T20:15:39.753+02:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-08-19T21:19:13.533+02:00")
 public class WellKnown {
   @JsonProperty("authorization_endpoint")
   private String authorizationEndpoint = null;
diff --git a/sdk/js/swagger/README.md b/sdk/js/swagger/README.md
index 2ace6fe6042..c8f2a6fbaff 100644
--- a/sdk/js/swagger/README.md
+++ b/sdk/js/swagger/README.md
@@ -140,6 +140,7 @@ Class | Method | HTTP request | Description
 *OryHydra.AdminApi* | [**isInstanceAlive**](docs/AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check alive status
 *OryHydra.AdminApi* | [**listOAuth2Clients**](docs/AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients
 *OryHydra.AdminApi* | [**listSubjectConsentSessions**](docs/AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
+*OryHydra.AdminApi* | [**prometheus**](docs/AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
 *OryHydra.AdminApi* | [**rejectConsentRequest**](docs/AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
 *OryHydra.AdminApi* | [**rejectLoginRequest**](docs/AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
 *OryHydra.AdminApi* | [**rejectLogoutRequest**](docs/AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
@@ -199,6 +200,7 @@ Class | Method | HTTP request | Description
 - **Flow**: accessCode
 - **Authorization URL**: /oauth2/auth
 - **Scopes**: 
-  - offline: A scope required when requesting refresh tokens
+  - offline: A scope required when requesting refresh tokens (alias for &#x60;offline&#x60;)
+  - offline_access: A scope required when requesting refresh tokens
   - openid: Request an OpenID Connect ID Token
 
diff --git a/sdk/js/swagger/docs/AdminApi.md b/sdk/js/swagger/docs/AdminApi.md
index 7e5eaf15871..1f3214e32d6 100644
--- a/sdk/js/swagger/docs/AdminApi.md
+++ b/sdk/js/swagger/docs/AdminApi.md
@@ -24,6 +24,7 @@ Method | HTTP request | Description
 [**isInstanceAlive**](AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check alive status
 [**listOAuth2Clients**](AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients
 [**listSubjectConsentSessions**](AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
+[**prometheus**](AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
 [**rejectConsentRequest**](AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
 [**rejectLoginRequest**](AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
 [**rejectLogoutRequest**](AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
@@ -789,7 +790,7 @@ No authorization required
 
 Introspect OAuth2 tokens
 
-The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.
+The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.  For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
 
 ### Example
 ```javascript
@@ -978,6 +979,46 @@ No authorization required
  - **Content-Type**: application/json
  - **Accept**: application/json
 
+<a name="prometheus"></a>
+# **prometheus**
+> prometheus()
+
+Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
+
+&#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: \&quot;4445\&quot; prometheus.io/path: \&quot;/metrics/prometheus\&quot; &#x60;&#x60;&#x60;
+
+### Example
+```javascript
+var OryHydra = require('ory_hydra');
+
+var apiInstance = new OryHydra.AdminApi();
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully.');
+  }
+};
+apiInstance.prometheus(callback);
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
+ - **Accept**: plain/text
+
 <a name="rejectConsentRequest"></a>
 # **rejectConsentRequest**
 > CompletedRequest rejectConsentRequest(consentChallenge, opts)
diff --git a/sdk/js/swagger/docs/PublicApi.md b/sdk/js/swagger/docs/PublicApi.md
index f5c76709da4..ee6e4600fb1 100644
--- a/sdk/js/swagger/docs/PublicApi.md
+++ b/sdk/js/swagger/docs/PublicApi.md
@@ -60,7 +60,7 @@ No authorization required
 
 OpenID Connect Discovery
 
-The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html
+The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html .  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
 
 ### Example
 ```javascript
@@ -300,7 +300,7 @@ null (empty response body)
 
 OpenID Connect Userinfo
 
-This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 access token. The endpoint implements http://openid.net/specs/openid-connect-core-1_0.html#UserInfo .
+This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token.  For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
 
 ### Example
 ```javascript
diff --git a/sdk/js/swagger/src/api/AdminApi.js b/sdk/js/swagger/src/api/AdminApi.js
index 412a1797e8c..20b0096cbf6 100644
--- a/sdk/js/swagger/src/api/AdminApi.js
+++ b/sdk/js/swagger/src/api/AdminApi.js
@@ -800,7 +800,7 @@
 
     /**
      * Introspect OAuth2 tokens
-     * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.
+     * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow.  For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
      * @param {String} token The string value of the token. For access tokens, this is the \&quot;access_token\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \&quot;refresh_token\&quot; value returned.
      * @param {Object} opts Optional parameters
      * @param {String} opts.scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
@@ -970,6 +970,44 @@
       );
     }
 
+    /**
+     * Callback function to receive the result of the prometheus operation.
+     * @callback module:api/AdminApi~prometheusCallback
+     * @param {String} error Error message, if any.
+     * @param data This operation does not return a value.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
+     * &#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: \&quot;4445\&quot; prometheus.io/path: \&quot;/metrics/prometheus\&quot; &#x60;&#x60;&#x60;
+     * @param {module:api/AdminApi~prometheusCallback} callback The callback function, accepting three arguments: error, data, response
+     */
+    this.prometheus = function(callback) {
+      var postBody = null;
+
+
+      var pathParams = {
+      };
+      var queryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+      };
+
+      var authNames = [];
+      var contentTypes = ['application/json', 'application/x-www-form-urlencoded'];
+      var accepts = ['plain/text'];
+      var returnType = null;
+
+      return this.apiClient.callApi(
+        '/metrics/prometheus', 'GET',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
+
     /**
      * Callback function to receive the result of the rejectConsentRequest operation.
      * @callback module:api/AdminApi~rejectConsentRequestCallback
diff --git a/sdk/js/swagger/src/api/PublicApi.js b/sdk/js/swagger/src/api/PublicApi.js
index 577100bb7eb..6b061fb6807 100644
--- a/sdk/js/swagger/src/api/PublicApi.js
+++ b/sdk/js/swagger/src/api/PublicApi.js
@@ -95,7 +95,7 @@
 
     /**
      * OpenID Connect Discovery
-     * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html
+     * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html .  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
      * @param {module:api/PublicApi~discoverOpenIDConfigurationCallback} callback The callback function, accepting three arguments: error, data, response
      * data is of type: {@link module:model/WellKnown}
      */
@@ -310,7 +310,7 @@
 
     /**
      * OpenID Connect Userinfo
-     * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 access token. The endpoint implements http://openid.net/specs/openid-connect-core-1_0.html#UserInfo .
+     * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token.  For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
      * @param {module:api/PublicApi~userinfoCallback} callback The callback function, accepting three arguments: error, data, response
      * data is of type: {@link module:model/UserinfoResponse}
      */
diff --git a/sdk/php/swagger/README.md b/sdk/php/swagger/README.md
index 860ba78aa05..6b3d19d3fa2 100644
--- a/sdk/php/swagger/README.md
+++ b/sdk/php/swagger/README.md
@@ -96,6 +96,7 @@ Class | Method | HTTP request | Description
 *AdminApi* | [**isInstanceAlive**](docs/Api/AdminApi.md#isinstancealive) | **GET** /health/alive | Check alive status
 *AdminApi* | [**listOAuth2Clients**](docs/Api/AdminApi.md#listoauth2clients) | **GET** /clients | List OAuth 2.0 Clients
 *AdminApi* | [**listSubjectConsentSessions**](docs/Api/AdminApi.md#listsubjectconsentsessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
+*AdminApi* | [**prometheus**](docs/Api/AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
 *AdminApi* | [**rejectConsentRequest**](docs/Api/AdminApi.md#rejectconsentrequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
 *AdminApi* | [**rejectLoginRequest**](docs/Api/AdminApi.md#rejectloginrequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
 *AdminApi* | [**rejectLogoutRequest**](docs/Api/AdminApi.md#rejectlogoutrequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
@@ -155,7 +156,8 @@ Class | Method | HTTP request | Description
 - **Flow**: accessCode
 - **Authorization URL**: /oauth2/auth
 - **Scopes**: 
- - **offline**: A scope required when requesting refresh tokens
+ - **offline**: A scope required when requesting refresh tokens (alias for `offline`)
+ - **offline_access**: A scope required when requesting refresh tokens
  - **openid**: Request an OpenID Connect ID Token
 
 
diff --git a/sdk/php/swagger/docs/Api/AdminApi.md b/sdk/php/swagger/docs/Api/AdminApi.md
index e4d3176d64e..b6073037bff 100644
--- a/sdk/php/swagger/docs/Api/AdminApi.md
+++ b/sdk/php/swagger/docs/Api/AdminApi.md
@@ -25,6 +25,7 @@ Method | HTTP request | Description
 [**isInstanceAlive**](AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check alive status
 [**listOAuth2Clients**](AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients
 [**listSubjectConsentSessions**](AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
+[**prometheus**](AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
 [**rejectConsentRequest**](AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
 [**rejectLoginRequest**](AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
 [**rejectLogoutRequest**](AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
@@ -762,7 +763,7 @@ No authorization required
 
 Introspect OAuth2 tokens
 
-The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `accessTokenExtra` during the consent flow.
+The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `accessTokenExtra` during the consent flow.  For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
 
 ### Example
 ```php
@@ -943,6 +944,46 @@ No authorization required
 
 [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
 
+# **prometheus**
+> prometheus()
+
+Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
+
+``` metadata: annotations: prometheus.io/port: \"4445\" prometheus.io/path: \"/metrics/prometheus\" ```
+
+### Example
+```php
+<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Hydra\SDK\Api\AdminApi();
+
+try {
+    $api_instance->prometheus();
+} catch (Exception $e) {
+    echo 'Exception when calling AdminApi->prometheus: ', $e->getMessage(), PHP_EOL;
+}
+?>
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
+ - **Accept**: plain/text
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
 # **rejectConsentRequest**
 > \Hydra\SDK\Model\CompletedRequest rejectConsentRequest($consent_challenge, $body)
 
diff --git a/sdk/php/swagger/docs/Api/PublicApi.md b/sdk/php/swagger/docs/Api/PublicApi.md
index 0962e7a45a7..d3455e1ef84 100644
--- a/sdk/php/swagger/docs/Api/PublicApi.md
+++ b/sdk/php/swagger/docs/Api/PublicApi.md
@@ -60,7 +60,7 @@ No authorization required
 
 OpenID Connect Discovery
 
-The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html
+The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html .  Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
 
 ### Example
 ```php
@@ -289,7 +289,7 @@ void (empty response body)
 
 OpenID Connect Userinfo
 
-This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 access token. The endpoint implements http://openid.net/specs/openid-connect-core-1_0.html#UserInfo .
+This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token.  For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
 
 ### Example
 ```php
diff --git a/sdk/php/swagger/lib/Api/AdminApi.php b/sdk/php/swagger/lib/Api/AdminApi.php
index 09d98e74617..0a5ec1e9bfc 100644
--- a/sdk/php/swagger/lib/Api/AdminApi.php
+++ b/sdk/php/swagger/lib/Api/AdminApi.php
@@ -1966,6 +1966,74 @@ public function listSubjectConsentSessionsWithHttpInfo($subject)
         }
     }
 
+    /**
+     * Operation prometheus
+     *
+     * Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
+     *
+     * Client for Hydra
+     *
+     * @throws \Hydra\SDK\ApiException on non-2xx response
+     * @return void
+     */
+    public function prometheus()
+    {
+        list($response) = $this->prometheusWithHttpInfo();
+        return $response;
+    }
+
+    /**
+     * Operation prometheusWithHttpInfo
+     *
+     * Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
+     *
+     * Client for Hydra
+     *
+     * @throws \Hydra\SDK\ApiException on non-2xx response
+     * @return array of null, HTTP status code, HTTP response headers (array of strings)
+     */
+    public function prometheusWithHttpInfo()
+    {
+        // parse inputs
+        $resourcePath = "/metrics/prometheus";
+        $httpBody = '';
+        $queryParams = [];
+        $headerParams = [];
+        $formParams = [];
+        $_header_accept = $this->apiClient->selectHeaderAccept(['plain/text']);
+        if (!is_null($_header_accept)) {
+            $headerParams['Accept'] = $_header_accept;
+        }
+        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']);
+
+
+        // for model (json/xml)
+        if (isset($_tempBody)) {
+            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
+        } elseif (count($formParams) > 0) {
+            $httpBody = $formParams; // for HTTP post (form)
+        }
+        // make the API Call
+        try {
+            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
+                $resourcePath,
+                'GET',
+                $queryParams,
+                $httpBody,
+                $headerParams,
+                null,
+                '/metrics/prometheus'
+            );
+
+            return [null, $statusCode, $httpHeader];
+        } catch (ApiException $e) {
+            switch ($e->getCode()) {
+            }
+
+            throw $e;
+        }
+    }
+
     /**
      * Operation rejectConsentRequest
      *