Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to add and rename tags for specific paths and operations #3

Open
fabsrc opened this issue Sep 3, 2017 · 0 comments
Open

Comments

@fabsrc
Copy link
Contributor

fabsrc commented Sep 3, 2017

In #2 a feature to add tags to all operations of an API was introduced. This feature (as well as renaming tags) may also be useful for specific paths and operations.

Implementation Details

  • Extend renameTags and addTags functions to allow renaming and adding of tags of specific paths and operations.

  • Possible configuration syntax:

    For a single path

     {
       "apis": [
         {
           "url": "http://petstore.swagger.io/v2/swagger.json",
           "paths": {
             "/pet": {
               "tags": {
                 "add": [
                   "animal"
                 ],
                 "rename": {
                   "pet": "creature"
                 }
               }
             }
           }
         }
       ]
     }

    For a single operation

     {
       "apis": [
         {
           "url": "http://petstore.swagger.io/v2/swagger.json",
           "paths": {
             "/pet": {
               "post": {
                 "tags": {
                   "add": [
                     "animal"
                   ],
                   "rename": {
                     "pet": "creature"
                   }
                 }
               }
             }
           }
         }
       ]
     }
  • Extend test suite

  • Add documentation to README

@fabsrc fabsrc changed the title Add and rename tags for specific paths and operations Add feature to add and rename tags for specific paths and operations Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant