Skip to content

Commit 779e7e8

Browse files
committed
fix: api doc
1 parent 8028b5a commit 779e7e8

File tree

51 files changed

+10837
-6255
lines changed

Some content is hidden

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

51 files changed

+10837
-6255
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ proto: ## Generate the protobuf files
5252
help:
5353
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5454

55+
clean-doc:
56+
@echo "> cleaning up auto-generated docs"
57+
@rm -rf ./docs/docs/reference/cli.md
58+
5559
doc: clean-doc ## Generate api and cli documentation
5660
@echo "> generate cli docs"
5761
@go run . reference --plain | sed '1 s,.*,# CLI,' > ./docs/docs/reference/cli.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
id: shield-service-check-resource-permission
3+
title: "check permission for action on a resource by an user"
4+
description: "check permission for action on a resource by an user"
5+
sidebar_label: "check permission for action on a resource by an user"
6+
hide_title: true
7+
hide_table_of_contents: true
8+
api: eJzVVE1v2zAM/SsGz1o+uptP64oddlrRdqc0KGiZidXKkqqPpFng/z5QThq3MzZgaw/TxQZJkXzvUdyDdeQxKmu+1lDCdaNI19fkN0rS3UVD8uGKgk1e0iX5VoWgrAEBnoKzJlCAcg9nsxl/agrSK8e5oITzIiQpKYRV0sUxfAICpDWRTOQb6JxWMlef3ge+tocgG2qR/+LOEZRgq3uSEQQ4z71G1RcNEWMKg7jKWk1ooMvd5Zbv3HPPw0j0HncgQEVqw58r9eY7VQ9CQ/TKrLnWwWuwpeBQ0mjQqY9RN2ptt1SPgTkeATWtMOk4wrQpkqEnRzJSXZD31r8H4dLWQ3DKRFqTBwEr61uMvenjGeNpKQRcj1NRU0Sl/0GOT737l9TMY10rxob6cnhlQKKnx0Qhfrb1rsf0JtS8/4T8XxP9gm7lebKjT9QJiLgOUC7gPMXmByzFq1GWvHCKU+5iZX2Bkr2FNQUWRx6KalegKVLIE9hSbCyvL2dDRouxgRKmm3lFEefTnBYEsK5Xpwn48oSt0/SKkSOKMSJOviH+k3VcpsUb5e+WnQBlVjZTriK3ftjYIGBD/hA+m8wnsyySDbHFrBAX+XuCX6j0LHekpzh1GlVeuslr9vXcL+DAPe+fzP5SQMPqlAvY7ysM9N3rrmPzYyK/g3KxFLBBr7BiXAvG2hDW5DOBD7SDEi769/rhhhvgcJ3y+L9+u5043jiXklz8bexyMECX365vQEB12A9t3nngccvi4hZKuIVbYO0yGfk1ZfseNJp1ylsP+rx8fgIc/JbF
9+
sidebar_class_name: "post api-method"
10+
info_path: apis/shield
11+
custom_edit_url: null
12+
---
13+
14+
import ApiTabs from "@theme/ApiTabs";
15+
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
16+
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
17+
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
18+
import MimeTabs from "@theme/MimeTabs";
19+
import ParamsItem from "@theme/ParamsItem";
20+
import ResponseSamples from "@theme/ResponseSamples";
21+
import SchemaItem from "@theme/SchemaItem";
22+
import SchemaTabs from "@theme/SchemaTabs";
23+
import Markdown from "@theme/Markdown";
24+
import OperationTabs from "@theme/OperationTabs";
25+
import TabItem from "@theme/TabItem";
26+
27+
<h1 className={"openapi__heading"}>
28+
check permission for action on a resource by an user
29+
</h1>
30+
31+
<MethodEndpoint method={"post"} path={"/v1beta1/check"}></MethodEndpoint>
32+
33+
check permission for action on a resource by an user
34+
35+
## Request
36+
37+
<MimeTabs className={"openapi-tabs__mime"}><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-mime"}><h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3><strong className={"openapi-schema__required"}>required</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"object_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"object_namespace"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"permission"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>resource_permissions</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"object_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"object_namespace"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"permission"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>
38+
39+
A successful response.
40+
41+
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"status"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>resource_permissions</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"object_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"object_namespace"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"permission"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"allowed"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"status\": true,\n \"resource_permissions\": [\n {\n \"object_id\": \"string\",\n \"object_namespace\": \"string\",\n \"permission\": \"string\",\n \"allowed\": true\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"default"} value={"default"}><div>
42+
43+
An unexpected error response.
44+
45+
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"code"} required={false} schemaName={"int32"} qualifierMessage={undefined} schema={{"type":"integer","format":"int32"}}></SchemaItem><SchemaItem collapsible={false} name={"message"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>details</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"@type"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"code\": 0,\n \"message\": \"string\",\n \"details\": [\n {\n \"@type\": \"string\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
46+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
id: shield-service-check-resource-user-permission
3+
title: "check permission for action on a resource by an user"
4+
description: "check permission for action on a resource by an user"
5+
sidebar_label: "check permission for action on a resource by an user"
6+
hide_title: true
7+
hide_table_of_contents: true
8+
api: eJzllDtv2zAQgP+KcFMLsLGTbpqaBB06NchjcozgTJ4tJhTJkJQTV9B/L46SbaV2W6BFp2qRxHt/d7wWnKeASTv7RUEJN5Umo24orLWkh8uK5NM1RdcESXeRwhWFWseonQUBgaJ3NlKEsoWz6ZRfiqIM2rM/KOG8iI2UFOOyMcVW/QQESGcT2cQW6L3RMmcweYxs1kKUFdXIX2njCUpwi0eSCQT4wPkm3QcNQ2oPfpdXHFlhCLgBATpRHX/vrT9+0GqkGlPQdgWd2Eot1hQ9SjqqtM/jqBiNcS809r9wzhBa6LaPAEVLbEw6QtMWjaVXTzKRKigEF/4FVOnUuDhtE60ogIClCzWm/ujjGddTU4y4Oo5CUUJt/qIdn3rxgWvmqJTm2tBcjU1GED0GrClRiFDOWuCuceKKwzNLj6nKI/zc6MAdSaEhcchoF3TeK1NMF05tek7/4QzvAL8l1wlIuGLWcN6k6hvMxQ/DK3mVFHvfxdKFAiVLC2cLLLYcisWmQFs0Mc9cTalyvJi8i7la7lsJk/XpghKeTlgtTlqtukmOAAK4Adf7Vn1+xdob+jnq2Rtq20qPwdrLxox2bOYdD9fSZWw6ccxhn4KANYVBfXpyejLNoF1MNWbKw3z+IaQ3pHctS/SaJt6gthysCYZlPb8ZDPxAQCYIAsp8OXqIcwEV8y5n0LYLjHQXTNfx8XNDYQPlbC5gjUHjgquctaB05G8F5RJNpIOcdpcF3l0Pk/O+AHE81+3oWx78NZqG/0DAE236S5xRV4SKQo7eCy77GB9u2XxveHA5O7G1OJeSfPql7nw0g1dfb25BwGJYAHVelBDwhTcJvkAJ93DPibpcd3+9+bwFg3bV5FUJvV9+vgMpFJza
9+
sidebar_class_name: "post api-method"
10+
info_path: apis/shield
11+
custom_edit_url: null
12+
---
13+
14+
import ApiTabs from "@theme/ApiTabs";
15+
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
16+
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
17+
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
18+
import MimeTabs from "@theme/MimeTabs";
19+
import ParamsItem from "@theme/ParamsItem";
20+
import ResponseSamples from "@theme/ResponseSamples";
21+
import SchemaItem from "@theme/SchemaItem";
22+
import SchemaTabs from "@theme/SchemaTabs";
23+
import Markdown from "@theme/Markdown";
24+
import OperationTabs from "@theme/OperationTabs";
25+
import TabItem from "@theme/TabItem";
26+
27+
<h1 className={"openapi__heading"}>
28+
check permission for action on a resource by an user
29+
</h1>
30+
31+
<MethodEndpoint
32+
method={"post"}
33+
path={"/v1beta1/users/{id}/check"}
34+
></MethodEndpoint>
35+
36+
check permission for action on a resource by an user
37+
38+
## Request
39+
40+
<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"id","in":"path","required":true,"schema":{"type":"string"}}}></ParamsItem></ul></div></details><MimeTabs className={"openapi-tabs__mime"}><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-mime"}><h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3><strong className={"openapi-schema__required"}>required</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>resource_permissions</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"object_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"object_namespace"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"permission"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>
41+
42+
A successful response.
43+
44+
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>resource_permissions</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"object_id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"object_namespace"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"permission"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"allowed"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"resource_permissions\": [\n {\n \"object_id\": \"string\",\n \"object_namespace\": \"string\",\n \"permission\": \"string\",\n \"allowed\": true\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"default"} value={"default"}><div>
45+
46+
An unexpected error response.
47+
48+
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"code"} required={false} schemaName={"int32"} qualifierMessage={undefined} schema={{"type":"integer","format":"int32"}}></SchemaItem><SchemaItem collapsible={false} name={"message"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>details</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"@type"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"code\": 0,\n \"message\": \"string\",\n \"details\": [\n {\n \"@type\": \"string\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
49+

0 commit comments

Comments
 (0)