directus-extension-api-docs 2.0.2 → 2.0.4

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.
Files changed (2) hide show
  1. package/README.md +13 -10
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,19 +1,15 @@
1
1
  # directus-extension-api-docs
2
2
 
3
- Directus Extension to include
4
-
5
- - a Swagger interface
6
- - configurable autogenerated openapi documentation file
7
- -- custom endpoint definitions included
8
- - validation middleware on your custom endpoints (based on your openapi)
9
-
10
3
  > Compatible with latest versions of Directus and packaged extensions.
11
4
 
12
- ![workspace](assets/swagger.png)
5
+ Directus Extension to include:
13
6
 
14
- All directus endpoints are autogenerated on runtime.
7
+ - a Swagger interface
8
+ - configurable autogenerated openapi specifications file
9
+ -- including custom endpoints definitions
10
+ - validation middleware on your custom endpoints (based on your openapi specifications). See below for details
15
11
 
16
- **You can enable validations middleware based on your custom definitions. See below**
12
+ ![workspace](assets/swagger.png)
17
13
 
18
14
  ## Prerequisites
19
15
 
@@ -90,6 +86,8 @@ tags:
90
86
  paths:
91
87
  "/my-custom-path/my-endpoint":
92
88
  post:
89
+ security:
90
+ - Auth: [ ]
93
91
  summary: Validate email
94
92
  description: Validate email
95
93
  tags:
@@ -120,6 +118,11 @@ components:
120
118
  schemas:
121
119
  Users:
122
120
  type: object # ref to standard components declaring it empty
121
+ securitySchemes:
122
+ Auth:
123
+ in: header
124
+ name: Authorization
125
+ type: apiKey
123
126
  ```
124
127
 
125
128
  ### Legacy mode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "directus-extension-api-docs",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "directus extension for swagger interface and openapi including custom endpoints definitions // custom endpoint validations middleware based on openapi",
5
5
  "licence": "MIT",
6
6
  "icon": "api",