TykTechnologies / tyk-sync

Tyk Sync - move Tyk configurations between multiple environments
Other
65 stars 24 forks source link

Feature request: add `dump` command "slim/quiet/terse" option #103

Open AlexChesser opened 1 year ago

AlexChesser commented 1 year ago

Link to community thread on the same topic: https://community.tyk.io/t/feature-request-please-allow-a-tyk-sync-dump-to-produce-a-minimal-output/6144/2

Dumped API configuration files are currently quite long and difficult to read. A "minimal settings" API produces a json file with 457 lines. If tyk-sync dump --terse had the option to ONLY dump the lines where the settings differ from defaults I suspect an API definition could be completed in about 20 lines

Just by eyeballing, I'm guessing this is about as minimal as it can get:

{
  "api_definition": {
    "id": "xxxxxxxxxxxxxxxxxxxxxxxx",
    "name": "public",
    "slug": "public",
    "api_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
    "org_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
    "use_keyless": true,
    "proxy": {
      "listen_path": "/public/",
      "target_url": "https://example.com/test",
      "strip_listen_path": true
    },
    "tags": [
      "my-tags"
    ]
  }
}

This will make it FAR easier for developers to read and understand the salient parts of an API definition which will reduce overall cognitive load and improve overall usability.