@nocobase/plugin-api-doc 1.4.0-alpha.1 → 1.4.0-alpha.10

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