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

Tags not included from the subsequent swaggers #62

Open
NikhilNanjappa-zz opened this issue Nov 15, 2018 · 4 comments
Open

Tags not included from the subsequent swaggers #62

NikhilNanjappa-zz opened this issue Nov 15, 2018 · 4 comments

Comments

@NikhilNanjappa-zz
Copy link

NikhilNanjappa-zz commented Nov 15, 2018

Running the command

swagger-combine config.json -o combined.json

with the following configuration

{
  "swagger": "2.0",
  "info": {
    "title": "Swagger Combine Rename Example",
    "version": "1.0.0"
  },
  "apis": [
    {
      "url": "http://petstore.swagger.io/v2/swagger.json"
    },
    {
      "url": "https://api.apis.guru/v2/specs/medium.com/1.0.0/swagger.yaml",
      "tags": {
        "rename": {
          "Users": "People"
        }
      }
    }
  ]
}

Issue

The "tags" are not getting included from the swagger files under apis.

Note: It will only include those tags that are present in the config file and not from the subsequent swaggers.

@NikhilNanjappa-zz NikhilNanjappa-zz changed the title Tags of the subsequent swagger is missing Tags of the subsequent swagger are missing Nov 15, 2018
@NikhilNanjappa-zz NikhilNanjappa-zz changed the title Tags of the subsequent swagger are missing Tags not included from the subsequent swaggers Nov 15, 2018
@cupofcoffe
Copy link

cupofcoffe commented Feb 19, 2019

not sure if i understood this 100%, but yes none of the tags were added into a merged swagger from the tags presented in the header of each swagger json registered in the apis URL, this removes not only the tags but also documentation about these tag (description) from the merged swagger. You still have option to add this manually into config swagger, but than you always have to merge all the changes manually.
_.defaultsDeep(this.combinedSchema, _.pick(schema, ['tags']));

in combineSchemas method

would do this trick but do not know if addtags / renametags will still do that job to manipulate with those "header" tags. if not, modification of addTags / renameTags will be required

@equalspeterd
Copy link

FWIW, this problem exists in OAS 3.x as well (now that -parser supports 3.x). Having to manage tags in the combine.config file is a pain, since I define a set of micro services as separate specifications, and a utility spec for re-usable fragments. I would like to keep the micro service descriptions where it belongs. Also, The same seems to be true with securitySchemes (missing from combined spec).

@Ghazgkull
Copy link

Is this the same as the issue I raised more recently? If so, it's fixed in the 1.3.0 release of this library, provided you pass the --includeGlobalTags option. #87

@equalspeterd
Copy link

the tags portion seems to be, however:

 Also, The same seems to be true with securitySchemes (missing from combined spec).

may be a separate issue.

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

5 participants