Skip to content

No provision to group API's and then $ref it to reference it in other file #508

@mkeshavgarg

Description

@mkeshavgarg

In our application, we have apis divided among various modules.

As per swagger-spec, It becomes very difficult to have only one swagger file (api-docs) for all the modules considering the number of apis and also number of teams working on various modules.

So I started using $ref (purpose: same folder reference) and third party swagger parsers to dereference it. But I still cannot figure out a way in swagger to group apis with one $ref.
So that I can assign all apis for a particular module to a team and then just $ref in api-docs that can be dereferenced lately to get complete single api-docs file

Eg:

//something like that
{
    'pet' : '$ref': './pet.json',
    'user' :'$ref': './user.json'
}

Which when dereferenced, will change to

{
    '/pet' : {},
    '/pet/{name}' : {},
    'change/pet' : {},
    '/user': {},
    '/user/data': {}
}

Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    re-use: ref-group-combineRe-use requests involving grouping components and combining groups

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions