Skip to content

Commit

Permalink
feat: adding an example for our x-metrics-enabled extension
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Sep 13, 2022
1 parent 14a8cfa commit 17c8bb5
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 4 deletions.
36 changes: 34 additions & 2 deletions 3.0/json/readme-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
{
"name": "Toggling our CORS proxy",
"description": "https://docs.readme.com/docs/openapi-extensions#cors-proxy-enabled"
},
{
"name": "Toggling API Metrics",
"description": "https://docs.readme.com/docs/openapi-extensions#disable-api-metrics"
}
],
"paths": {
Expand Down Expand Up @@ -211,7 +215,7 @@
"post": {
"operationId": "x-readme_proxy-enabled",
"summary": "Disable funneling requests through our CORS proxy with the \"x-readme.proxy-enabled\" extension",
"description": "When `x-readme.proxy-enabled` is set to `false` all requests from the interactive will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.\n\nhttps://docs.readme.com/docs/openapi-extensions#cors-proxy-enabled",
"description": "When `x-readme.proxy-enabled` is set to `false` all requests from the interactive API Explorer will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.\n\nhttps://docs.readme.com/docs/openapi-extensions#cors-proxy-enabled",
"tags": ["Toggling our CORS proxy"],
"responses": {
"200": {
Expand All @@ -225,7 +229,7 @@
"patch": {
"operationId": "x-proxy-enabled",
"summary": "Disable funneling requests through our CORS proxy with the \"x-proxy-enabled\" extension",
"description": "When `x-readme.proxy-enabled` is set to `false` all requests from the interactive will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.\n\n> If this is present alongside `x-readme.proxy-enabled` then the `x-readme.proxy-enabled` extension will take precedence over this extension.\n\nhttps://docs.readme.com/docs/openapi-extensions#cors-proxy-enabled",
"description": "When `x-proxy-enabled` is set to `false` all requests from the interactive API Explorer will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.\n\n> If this is present alongside `x-readme.proxy-enabled` then the `x-readme.proxy-enabled` extension will take precedence over this extension.\n\nhttps://docs.readme.com/docs/openapi-extensions#cors-proxy-enabled",
"tags": ["Toggling our CORS proxy"],
"responses": {
"200": {
Expand All @@ -234,6 +238,34 @@
},
"x-proxy-enabled": false
}
},
"/x-metrics-enabled": {
"post": {
"operationId": "x-readme_metrics-enabled",
"summary": "Disable tracking requests through our API Metrics product with the \"x-readme.metrics-enabled\" extension",
"description": "When `x-readme.metrics-enabled` is set to `false` all requests from the interactive API Explorer will not be tracked for you within our [API Metrics product](https://readme.com/metrics) and you will not see any requests on that operations reference page that may have been logged to API Metrics through one of our many SDKs.\n\nhttps://docs.readme.com/docs/openapi-extensions#disable-api-metrics",
"tags": ["Toggling API Metrics"],
"responses": {
"200": {
"description": "OK"
}
},
"x-readme": {
"metrics-enabled": false
}
},
"patch": {
"operationId": "x-metrics-enabled",
"summary": "Disable tracking requests through our API Metrics product with the \"x-metrics-enabled\" extension",
"description": "When `x-metrics-enabled` is set to `false` all requests from the interactive API Explorer will not be tracked for you within our [API Metrics product](https://readme.com/metrics) and you will not see any requests on that operations reference page that may have been logged to API Metrics through one of our many SDKs.\n\nhttps://docs.readme.com/docs/openapi-extensions#disable-api-metrics",
"tags": ["Toggling API Metrics"],
"responses": {
"200": {
"description": "OK"
}
},
"x-metrics-enabled": false
}
}
},
"components": {
Expand Down
36 changes: 34 additions & 2 deletions 3.0/yaml/readme-extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ tags:
description: https://docs.readme.com/docs/openapi-extensions#code-sample-languages
- name: Toggling our CORS proxy
description: https://docs.readme.com/docs/openapi-extensions#cors-proxy-enabled
- name: Toggling API Metrics
description: https://docs.readme.com/docs/openapi-extensions#disable-api-metrics
paths:
'/x-code-samples':
post:
Expand Down Expand Up @@ -194,7 +196,7 @@ paths:
summary: Disable funneling requests through our CORS proxy with the "x-readme.proxy-enabled"
extension
description: |-
When `x-readme.proxy-enabled` is set to `false` all requests from the interactive will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.
When `x-readme.proxy-enabled` is set to `false` all requests from the interactive API Explorer will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.
https://docs.readme.com/docs/openapi-extensions#cors-proxy-enabled
tags:
Expand All @@ -209,7 +211,7 @@ paths:
summary: Disable funneling requests through our CORS proxy with the "x-proxy-enabled"
extension
description: |-
When `x-readme.proxy-enabled` is set to `false` all requests from the interactive will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.
When `x-proxy-enabled` is set to `false` all requests from the interactive API Explorer will be funneled directly to the configured server URL, otherwise they will be piped through our proxy to allow [CORS-enabled](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests for you.
> If this is present alongside `x-readme.proxy-enabled` then the `x-readme.proxy-enabled` extension will take precedence over this extension.
Expand All @@ -220,6 +222,36 @@ paths:
'200':
description: OK
x-proxy-enabled: false
'/x-metrics-enabled':
post:
operationId: x-readme_metrics-enabled
summary: Disable tracking requests through our API Metrics product with the
"x-readme.metrics-enabled" extension
description: |-
When `x-readme.metrics-enabled` is set to `false` all requests from the interactive API Explorer will not be tracked for you within our [API Metrics product](https://readme.com/metrics) and you will not see any requests on that operations reference page that may have been logged to API Metrics through one of our many SDKs.
https://docs.readme.com/docs/openapi-extensions#disable-api-metrics
tags:
- Toggling API Metrics
responses:
'200':
description: OK
x-readme:
metrics-enabled: false
patch:
operationId: x-metrics-enabled
summary: Disable tracking requests through our API Metrics product with the
"x-metrics-enabled" extension
description: |-
When `x-metrics-enabled` is set to `false` all requests from the interactive API Explorer will not be tracked for you within our [API Metrics product](https://readme.com/metrics) and you will not see any requests on that operations reference page that may have been logged to API Metrics through one of our many SDKs.
https://docs.readme.com/docs/openapi-extensions#disable-api-metrics
tags:
- Toggling API Metrics
responses:
'200':
description: OK
x-metrics-enabled: false
components:
securitySchemes:
petstore_auth:
Expand Down

0 comments on commit 17c8bb5

Please sign in to comment.