@nocobase/plugin-api-doc 1.4.0-alpha.6 → 1.4.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,80 +1,30 @@
1
- # api-doc
1
+ # NocoBase
2
2
 
3
- English | [中文](./README.zh-CN.md)
3
+ <video width="100%" controls>
4
+ <source src="https://static-docs.nocobase.com/NocoBase0510.mp4" type="video/mp4">
5
+ </video>
4
6
 
5
7
 
6
- ## Introduction
8
+ ## What is NocoBase
7
9
 
8
- This plugin is based on `swagger` to write documentation.
10
+ NocoBase is a scalability-first, open-source no-code development platform.
11
+ Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!
9
12
 
10
- ## How to access the documentation
13
+ Homepage:
14
+ https://www.nocobase.com/
11
15
 
12
- 1. The access address in the plugin center is `{domain}/admin/settings/api-doc/documentation`
13
- 2. The access address outside the plugin center is `{domain}/api-documentation`
16
+ Online Demo:
17
+ https://demo.nocobase.com/new
14
18
 
15
- ## How to write swagger documentation
19
+ Documents:
20
+ https://docs.nocobase.com/
16
21
 
17
- > The method in the plugin is the same
22
+ Commericial license & plugins:
23
+ https://www.nocobase.com/en/commercial
18
24
 
19
- 1. `src/swagger.{ts,json}`
20
- 2. `src/swagger/index.{ts,json}`
25
+ License agreement:
26
+ https://www.nocobase.com/en/agreement
21
27
 
22
- The file paths above can all be traversed to write documentation. Just export your written documentation by default. An example is shown below:
23
28
 
24
- ```ts
25
- export default {
26
- info: {
27
- title: 'NocoBase API - Api-doc plugin',
28
- },
29
- tags: [],
30
- paths: {},
31
- components: {
32
- schemas: {}
33
- }
34
- };
35
- ```
36
-
37
- Usually, you only need to write **info.title**, **tags**, **paths**, and **components**. Other information such as **server** and **info** are merged into our **base-swagger**.
38
-
39
- Base swagger includes the following code:
40
-
41
- ```ts
42
- // base swagger
43
- export default {
44
- openapi: '3.0.3',
45
- info: {
46
- title: 'NocoBase API documentation',
47
- description: '',
48
- contact: {
49
- url: 'https://github.com/nocobase/nocobase/issues',
50
- },
51
- license: {
52
- name: 'Core packages are Apache 2.0 & Plugins packages are AGPL 3.0 licensed.',
53
- url: 'https://github.com/nocobase/nocobase#license',
54
- },
55
- },
56
- externalDocs: {
57
- description: 'Find out more about NocoBase',
58
- url: 'https://docs.nocobase.com/',
59
- },
60
- components: {
61
- securitySchemes: {
62
- 'api-key': {
63
- type: 'http',
64
- scheme: 'bearer',
65
- },
66
- },
67
- },
68
- security: [
69
- {
70
- 'api-key': [],
71
- },
72
- ],
73
- };
74
- ```
75
-
76
- > Note that configurations that can only be obtained at runtime, such as the server and version fields, are not filled in the base-swagger.
77
-
78
- You can also override these defaults. When writing the swagger documentation for your plugin, you should consider whether your plugin's documentation can be accessed independently.
79
-
80
- For detailed swagger writing rules, please refer to the [official documentation](https://swagger.io/docs/specification/about/).
29
+ ## Contact Us:
30
+ hello@nocobase.com
@@ -8,15 +8,15 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.4.0-alpha.6",
12
- "@nocobase/sdk": "1.4.0-alpha.6",
11
+ "@nocobase/client": "1.4.0-alpha.8",
12
+ "@nocobase/sdk": "1.4.0-alpha.8",
13
13
  "antd": "5.12.8",
14
14
  "react": "18.2.0",
15
15
  "@ant-design/icons": "5.2.6",
16
16
  "antd-style": "3.7.1",
17
17
  "react-i18next": "11.18.6",
18
- "@nocobase/actions": "1.4.0-alpha.6",
19
- "@nocobase/server": "1.4.0-alpha.6",
20
- "@nocobase/utils": "1.4.0-alpha.6",
21
- "@nocobase/database": "1.4.0-alpha.6"
18
+ "@nocobase/actions": "1.4.0-alpha.8",
19
+ "@nocobase/server": "1.4.0-alpha.8",
20
+ "@nocobase/utils": "1.4.0-alpha.8",
21
+ "@nocobase/database": "1.4.0-alpha.8"
22
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-api-doc",
3
- "version": "1.4.0-alpha.6",
3
+ "version": "1.4.0-alpha.8",
4
4
  "displayName": "API documentation",
5
5
  "displayName.zh-CN": "API 文档",
6
6
  "description": "An OpenAPI documentation generator for NocoBase HTTP API.",
@@ -23,5 +23,5 @@
23
23
  "url": "git+https://github.com/nocobase/nocobase.git",
24
24
  "directory": "packages/plugins/api-doc"
25
25
  },
26
- "gitHead": "7d8583704a1f7ae0caeab72a19fd0bce0a4cec0f"
26
+ "gitHead": "aa36bd20b2028c5e133a59e922c2f1ab22c86dde"
27
27
  }
package/README.zh-CN.md DELETED
@@ -1,79 +0,0 @@
1
- # api-doc
2
-
3
- [English](./README.md) | 中文
4
-
5
- ## 简介
6
-
7
- 该插件基于 `swagger` 编写文档。
8
-
9
- ## 如何访问文档
10
-
11
- 1. 在插件中心访问地址是 `{domain}/admin/settings/api-doc/documentation`
12
- 2. 在插件中心外访问地址是 `{domain}/api-documentation`
13
-
14
- ## 如何编写 swagger 文档
15
-
16
- > 插件内方式一样
17
-
18
- 1. `src/swagger.{ts,json}`
19
- 2. `src/swagger/index.{ts,json}`
20
-
21
- 上面的文件路径均可遍写文档,只需最后将您编写的文档默认导出即可,例子如下:
22
-
23
- ```ts
24
- export default {
25
- info: {
26
- title: 'NocoBase API - Auth plugin',
27
- },
28
- tags: [],
29
- paths: {},
30
- components: {
31
- schemas: {}
32
- }
33
- };
34
- ```
35
-
36
- 通常你只需要编写 **info.title**, **tags**, **paths**, **components** 即可其他内容如 **server**, **info** 的其他信息都合并我们的 **base-swagger**.
37
-
38
- base swagger 包含如下代码
39
- ```ts
40
- // base swagger
41
- export default {
42
- openapi: '3.0.3',
43
- info: {
44
- title: 'NocoBase API documentation',
45
- description: '',
46
- contact: {
47
- url: 'https://github.com/nocobase/nocobase/issues',
48
- },
49
- license: {
50
- name: 'Core packages are Apache 2.0 & Plugins packages are AGPL 3.0 licensed.',
51
- url: 'https://github.com/nocobase/nocobase#license',
52
- },
53
- },
54
- externalDocs: {
55
- description: 'Find out more about NocoBase',
56
- url: 'https://docs.nocobase.com/',
57
- },
58
- components: {
59
- securitySchemes: {
60
- 'api-key': {
61
- type: 'http',
62
- scheme: 'bearer',
63
- },
64
- },
65
- },
66
- security: [
67
- {
68
- 'api-key': [],
69
- },
70
- ],
71
- };
72
-
73
- ```
74
-
75
- > 注意:涉及到运行时才能获取的配置,并没有填写在 base-swagger 里,如 server, version 字段
76
-
77
- 这些默认的配置你同样也可以覆盖它,在你编写插件的 `swagger` 文档时,你需要视你的插件文档是独立的文档,可以被单独访问。
78
-
79
- 详细的 `swagger` 编写规则请参考[官方文档](https://swagger.io/docs/specification/about/)