Skip to content

Commit 20df91d

Browse files
authored
[Cleanup]: Remove unused code (#57)
* Remove proxy package * Remove plugin proxy dependency within preset-openapi * Re-add proxy plugin and dependency * Add .js file extention to petstore/sidebar * Remove instances of manual authentication * Remove plugin proxy * Fix navbar links * Remove preset-openapi package * Add preset-classic dependency to demo * Remove preset-openapi path from jest
1 parent db3c3e9 commit 20df91d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+592
-7278
lines changed

demo/api/cos/create-a-bucket.api.mdx

Lines changed: 5 additions & 162 deletions
Large diffs are not rendered by default.

demo/api/cos/generating-an-iam-token.api.mdx

Lines changed: 5 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -3,118 +3,19 @@ id: generating-an-iam-token
33
sidebar_label: Generating an IAM token
44
hide_title: true
55
hide_table_of_contents: true
6-
api:
7-
{
8-
"tags": ["Authentication"],
9-
"description": "Generate an IBM Cloud® Identity and Access Management (IAM) token by using either your [IAM API key](https://cloud.ibm.com/docs/iam?topic=iam-userapikey#userapikey) or a [service ID's API key](https://cloud.ibm.com/docs/iam?topic=iam-serviceidapikeys#serviceidapikeys) IBM Cloud APIs can be accessed only by users who are authorized by an assigned IAM role.\nEach user who is calling the API must pass credentials for the API to authenticate.\n\nYou can generate an IAM token by using either your IBM Cloud API key or a service ID's API key.\nThe API key is a permanent credential that can be reused if you don't lose the API key value or delete the API key in the account.\nThis process is also used if you are developing an application that needs to work with other IBM Cloud services.\nYou must use a service ID API key to get an access token to be passed to each of the IBM Cloud services.\n\n:::note\nAn access token is a temporary credential that expires after 1 hour.\nAfter the acquired token expires, you must generate a new token to continue calling IBM Cloud or service APIs, and you can perform only actions that are allowed by your level of assigned access within all accounts.\n:::",
10-
"requestBody":
11-
{
12-
"content":
13-
{
14-
"application/x-www-form-urlencoded":
15-
{
16-
"schema":
17-
{
18-
"type": "object",
19-
"properties":
20-
{
21-
"grant_type":
22-
{
23-
"type": "string",
24-
"enum": ["urn:ibm:params:oauth:grant-type:apikey"],
25-
},
26-
"apikey": { "type": "string" },
27-
},
28-
"required": ["grant_type", "apikey"],
29-
},
30-
},
31-
},
32-
"required": true,
33-
},
34-
"security": [{ "//": [] }],
35-
"responses": { "200": { "description": "ok" } },
36-
"method": "post",
37-
"path": "/identity/token",
38-
"servers":
39-
[
40-
{
41-
"url": "https://s3.{region}.cloud-object-storage.appdomain.cloud",
42-
"variables":
43-
{
44-
"region":
45-
{
46-
"enum":
47-
[
48-
"us",
49-
"eu",
50-
"ap",
51-
"us-south",
52-
"us-east",
53-
"eu-gb",
54-
"eu-de",
55-
"au-syd",
56-
"jp-tok",
57-
"ams03",
58-
"che01",
59-
"hkg02",
60-
"mex01",
61-
"mil01",
62-
"mon01",
63-
"osl01",
64-
"par01",
65-
"sjc04",
66-
"sao01",
67-
"seo01",
68-
"sng01",
69-
"tor01",
70-
],
71-
"default": "us",
72-
},
73-
},
74-
},
75-
],
76-
"securitySchemes":
77-
{
78-
"BearerAuth": { "type": "http", "scheme": "bearer" },
79-
"BasicAuth": { "type": "http", "scheme": "basic" },
80-
},
81-
"info": { "title": "Cloud Object Storage", "version": "1.0.1" },
82-
"postman":
83-
{
84-
"name": "Generating an IAM token",
85-
"description":
86-
{
87-
"content": "Generate an IBM Cloud® Identity and Access Management (IAM) token by using either your [IAM API key](https://cloud.ibm.com/docs/iam?topic=iam-userapikey#userapikey) or a [service ID's API key](https://cloud.ibm.com/docs/iam?topic=iam-serviceidapikeys#serviceidapikeys) IBM Cloud APIs can be accessed only by users who are authorized by an assigned IAM role.\nEach user who is calling the API must pass credentials for the API to authenticate.\n\nYou can generate an IAM token by using either your IBM Cloud API key or a service ID's API key.\nThe API key is a permanent credential that can be reused if you don't lose the API key value or delete the API key in the account.\nThis process is also used if you are developing an application that needs to work with other IBM Cloud services.\nYou must use a service ID API key to get an access token to be passed to each of the IBM Cloud services.\n\n:::note\nAn access token is a temporary credential that expires after 1 hour.\nAfter the acquired token expires, you must generate a new token to continue calling IBM Cloud or service APIs, and you can perform only actions that are allowed by your level of assigned access within all accounts.\n:::",
88-
"type": "text/plain",
89-
},
90-
"url":
91-
{
92-
"path": ["identity", "token"],
93-
"host": ["{{baseUrl}}"],
94-
"query": [],
95-
"variable": [],
96-
},
97-
"header":
98-
[
99-
{
100-
"key": "Content-Type",
101-
"value": "application/x-www-form-urlencoded",
102-
},
103-
],
104-
"method": "POST",
105-
"body": { "mode": "urlencoded", "urlencoded": [] },
106-
},
107-
}
6+
api: {"tags":["Authentication"],"description":"Generate an IBM Cloud® Identity and Access Management (IAM) token by using either your [IAM API key](https://cloud.ibm.com/docs/iam?topic=iam-userapikey#userapikey) or a [service ID's API key](https://cloud.ibm.com/docs/iam?topic=iam-serviceidapikeys#serviceidapikeys) IBM Cloud APIs can be accessed only by users who are authorized by an assigned IAM role.\nEach user who is calling the API must pass credentials for the API to authenticate.\n\nYou can generate an IAM token by using either your IBM Cloud API key or a service ID's API key.\nThe API key is a permanent credential that can be reused if you don't lose the API key value or delete the API key in the account.\nThis process is also used if you are developing an application that needs to work with other IBM Cloud services.\nYou must use a service ID API key to get an access token to be passed to each of the IBM Cloud services.\n\n:::note\nAn access token is a temporary credential that expires after 1 hour.\nAfter the acquired token expires, you must generate a new token to continue calling IBM Cloud or service APIs, and you can perform only actions that are allowed by your level of assigned access within all accounts.\n:::","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","enum":["urn:ibm:params:oauth:grant-type:apikey"]},"apikey":{"type":"string"}},"required":["grant_type","apikey"]}}},"required":true},"security":[{"//":[]}],"responses":{"200":{"description":"ok"}},"method":"post","path":"/identity/token","servers":[{"url":"https://s3.{region}.cloud-object-storage.appdomain.cloud","variables":{"region":{"enum":["us","eu","ap","us-south","us-east","eu-gb","eu-de","au-syd","jp-tok","ams03","che01","hkg02","mex01","mil01","mon01","osl01","par01","sjc04","sao01","seo01","sng01","tor01"],"default":"us"}}}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"},"BasicAuth":{"type":"http","scheme":"basic"}},"info":{"title":"Cloud Object Storage","version":"1.0.1"},"postman":{"name":"Generating an IAM token","description":{"content":"Generate an IBM Cloud® Identity and Access Management (IAM) token by using either your [IAM API key](https://cloud.ibm.com/docs/iam?topic=iam-userapikey#userapikey) or a [service ID's API key](https://cloud.ibm.com/docs/iam?topic=iam-serviceidapikeys#serviceidapikeys) IBM Cloud APIs can be accessed only by users who are authorized by an assigned IAM role.\nEach user who is calling the API must pass credentials for the API to authenticate.\n\nYou can generate an IAM token by using either your IBM Cloud API key or a service ID's API key.\nThe API key is a permanent credential that can be reused if you don't lose the API key value or delete the API key in the account.\nThis process is also used if you are developing an application that needs to work with other IBM Cloud services.\nYou must use a service ID API key to get an access token to be passed to each of the IBM Cloud services.\n\n:::note\nAn access token is a temporary credential that expires after 1 hour.\nAfter the acquired token expires, you must generate a new token to continue calling IBM Cloud or service APIs, and you can perform only actions that are allowed by your level of assigned access within all accounts.\n:::","type":"text/plain"},"url":{"path":["identity","token"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"method":"POST","body":{"mode":"urlencoded","urlencoded":[]}}}
1087
sidebar_class_name: "post api-method"
1098
---
1109

11110
import ParamsItem from "@theme/ParamsItem";
112-
import SchemaItem from "@theme/SchemaItem";
11+
import SchemaItem from "@theme/SchemaItem"
11312
import Tabs from "@theme/Tabs";
11413
import TabItem from "@theme/TabItem";
11514

11615
## Generating an IAM token
11716

17+
18+
11819
Generate an IBM Cloud® Identity and Access Management (IAM) token by using either your [IAM API key](https://cloud.ibm.com/docs/iam?topic=iam-userapikey#userapikey) or a [service ID's API key](https://cloud.ibm.com/docs/iam?topic=iam-serviceidapikeys#serviceidapikeys) IBM Cloud APIs can be accessed only by users who are authorized by an assigned IAM role.
11920
Each user who is calling the API must pass credentials for the API to authenticate.
12021

@@ -133,4 +34,4 @@ After the acquired token expires, you must generate a new token to continue call
13334
ok
13435

13536
</div><div></div></TabItem></Tabs></div>
136-
37+

demo/api/cos/list-buckets.api.mdx

Lines changed: 5 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -3,135 +3,19 @@ id: list-buckets
33
sidebar_label: List buckets
44
hide_title: true
55
hide_table_of_contents: true
6-
api:
7-
{
8-
"tags": ["Bucket operations"],
9-
"description": "A `GET` request sent to the endpoint root returns a list of buckets that are associated with the specified service instance.\nFor more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).",
10-
"parameters":
11-
[
12-
{
13-
"in": "query",
14-
"name": "extended",
15-
"description": "Provides `LocationConstraint` metadata in the listing.",
16-
"required": false,
17-
"schema": { "type": "boolean" },
18-
"allowEmptyValue": true,
19-
},
20-
{
21-
"name": "ibm-service-instance-id",
22-
"in": "header",
23-
"description": "List buckets that were created in this service instance.",
24-
"required": true,
25-
"schema": { "type": "string" },
26-
},
27-
],
28-
"security": [{ "BearerAuth": [] }, { "BearerAuth": [], "BasicAuth": [] }],
29-
"responses": { "200": { "description": "ok" } },
30-
"method": "get",
31-
"path": "/",
32-
"servers":
33-
[
34-
{
35-
"url": "https://s3.{region}.cloud-object-storage.appdomain.cloud",
36-
"variables":
37-
{
38-
"region":
39-
{
40-
"enum":
41-
[
42-
"us",
43-
"eu",
44-
"ap",
45-
"us-south",
46-
"us-east",
47-
"eu-gb",
48-
"eu-de",
49-
"au-syd",
50-
"jp-tok",
51-
"ams03",
52-
"che01",
53-
"hkg02",
54-
"mex01",
55-
"mil01",
56-
"mon01",
57-
"osl01",
58-
"par01",
59-
"sjc04",
60-
"sao01",
61-
"seo01",
62-
"sng01",
63-
"tor01",
64-
],
65-
"default": "us",
66-
},
67-
},
68-
},
69-
],
70-
"securitySchemes":
71-
{
72-
"BearerAuth": { "type": "http", "scheme": "bearer" },
73-
"BasicAuth": { "type": "http", "scheme": "basic" },
74-
},
75-
"info": { "title": "Cloud Object Storage", "version": "1.0.1" },
76-
"postman":
77-
{
78-
"name": "List buckets",
79-
"description":
80-
{
81-
"content": "A `GET` request sent to the endpoint root returns a list of buckets that are associated with the specified service instance.\nFor more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).",
82-
"type": "text/plain",
83-
},
84-
"url":
85-
{
86-
"path": [""],
87-
"host": ["{{baseUrl}}"],
88-
"query":
89-
[
90-
{
91-
"disabled": false,
92-
"description":
93-
{
94-
"content": "Provides `LocationConstraint` metadata in the listing.",
95-
"type": "text/plain",
96-
},
97-
"key": "extended",
98-
"value": "",
99-
},
100-
],
101-
"variable": [],
102-
},
103-
"header":
104-
[
105-
{
106-
"disabled": false,
107-
"description":
108-
{
109-
"content": "(Required) List buckets that were created in this service instance.",
110-
"type": "text/plain",
111-
},
112-
"key": "ibm-service-instance-id",
113-
"value": "",
114-
},
115-
],
116-
"method": "GET",
117-
"auth":
118-
{
119-
"type": "bearer",
120-
"bearer":
121-
[{ "type": "any", "value": "<Bearer Token>", "key": "token" }],
122-
},
123-
},
124-
}
6+
api: {"tags":["Bucket operations"],"description":"A `GET` request sent to the endpoint root returns a list of buckets that are associated with the specified service instance.\nFor more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).","parameters":[{"in":"query","name":"extended","description":"Provides `LocationConstraint` metadata in the listing.","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true},{"name":"ibm-service-instance-id","in":"header","description":"List buckets that were created in this service instance.","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]},{"BearerAuth":[],"BasicAuth":[]}],"responses":{"200":{"description":"ok"}},"method":"get","path":"/","servers":[{"url":"https://s3.{region}.cloud-object-storage.appdomain.cloud","variables":{"region":{"enum":["us","eu","ap","us-south","us-east","eu-gb","eu-de","au-syd","jp-tok","ams03","che01","hkg02","mex01","mil01","mon01","osl01","par01","sjc04","sao01","seo01","sng01","tor01"],"default":"us"}}}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"},"BasicAuth":{"type":"http","scheme":"basic"}},"info":{"title":"Cloud Object Storage","version":"1.0.1"},"postman":{"name":"List buckets","description":{"content":"A `GET` request sent to the endpoint root returns a list of buckets that are associated with the specified service instance.\nFor more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).","type":"text/plain"},"url":{"path":[""],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"Provides `LocationConstraint` metadata in the listing.","type":"text/plain"},"key":"extended","value":""}],"variable":[]},"header":[{"disabled":false,"description":{"content":"(Required) List buckets that were created in this service instance.","type":"text/plain"},"key":"ibm-service-instance-id","value":""}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"<Bearer Token>","key":"token"}]}}}
1257
sidebar_class_name: "get api-method"
1268
---
1279

12810
import ParamsItem from "@theme/ParamsItem";
129-
import SchemaItem from "@theme/SchemaItem";
11+
import SchemaItem from "@theme/SchemaItem"
13012
import Tabs from "@theme/Tabs";
13113
import TabItem from "@theme/TabItem";
13214

13315
## List buckets
13416

17+
18+
13519
A `GET` request sent to the endpoint root returns a list of buckets that are associated with the specified service instance.
13620
For more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints#endpoints).
13721

@@ -140,4 +24,4 @@ For more information about endpoints, see [Endpoints and storage locations](http
14024
ok
14125

14226
</div><div></div></TabItem></Tabs></div>
143-
27+

0 commit comments

Comments
 (0)