Skip to content

Script to leave only selected collections for swagger documentation generated by directus.

Notifications You must be signed in to change notification settings

ketiovv/directus-swagger-sanitizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

directus-swagger-sanitizer

Description

Script to leave only selected collections for swagger documentation generated by directus.

Usage

If you want to use this script, type all desired collection names in the lists below.

custom_collections = ["ItemsExample"]
directus_collections = ["Example"]
  • for custom collections, use the custom_collections - remember the Items prefix for each collection(e.g. for the Cars collection it will be ItemsCars)
  • for default directus collections use the directus_collections

Then just put file swagger.json into the project directory and run script main.py with python.

It will return a second swagger file named modified-swagger.json with the desired result.

About

Script to leave only selected collections for swagger documentation generated by directus.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages