directus-extension-api-docs 2.0.1 → 2.0.3

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 +14 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,20 +1,18 @@
1
1
  # directus-extension-api-docs
2
2
 
3
- Directus Extension to include
3
+ > Compatible with latest versions of Directus and packaged extensions.
4
+
5
+ Directus Extension to include:
4
6
 
5
7
  - 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)
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
9
11
 
10
- > Compatible with latest versions of Directus and monorepo installation with packaged extension.
12
+ > Compatible with latest versions of Directus and packaged extensions.
11
13
 
12
14
  ![workspace](assets/swagger.png)
13
15
 
14
- All directus endpoints are autogenerated on runtime.
15
-
16
- **You can enable validations middleware based on your custom definitions. See below**
17
-
18
16
  ## Prerequisites
19
17
 
20
18
  Working in a Directus nodejs project
@@ -90,6 +88,8 @@ tags:
90
88
  paths:
91
89
  "/my-custom-path/my-endpoint":
92
90
  post:
91
+ security:
92
+ - Auth: [ ]
93
93
  summary: Validate email
94
94
  description: Validate email
95
95
  tags:
@@ -120,6 +120,11 @@ components:
120
120
  schemas:
121
121
  Users:
122
122
  type: object # ref to standard components declaring it empty
123
+ securitySchemes:
124
+ Auth:
125
+ in: header
126
+ name: Authorization
127
+ type: apiKey
123
128
  ```
124
129
 
125
130
  ### Legacy mode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "directus-extension-api-docs",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
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",