Forum Discussion

aditya369's avatar
aditya369
Regular Visitor
6 years ago

swagger yaml inheritance

Hi Team,

I think this is an advanced question involving yaml inheritance at the file level. Need team's insights on my problem condition.

 

I have a complete yaml from a partner - A.yml. (I should not modify this file as much as possible)

Now I am supposed to just define one of the post operation my way. There are 2 ways:

1. Direct way: Make a copy of A.yml, name it myA.yml and make specific change here.

2. Inheritance way: In my file myA.yml, include and inherit from A.yml and override the post operation just the way I want.

 

Option 2 gives flexibility to me wrt the precise changes I make over the given yaml definition. This shall be simple to refer is our thought.

 

Can option 2 be achieved in Swagger 2.0?

No RepliesBe the first to reply