3

I am trying to reuse existing (say, base.yml) YAML definitions by inheriting and overriding base.yml's function 'A'.

Note that this base.yml is shared by a different team and I am not supposed to modify it.

Hence, I want to write a new YAML definition file (say, derived.yml) which inherits from base.yml, but redefines just 'A' as I needed.

Is there a way to achieve this? I read about Swagger 3.0, which supports constructs like OneOf, AllOf etc (which I am still exploring) but primarily I am looking at Swagger 2.0, as much as possible.

Aditya369
  • 545
  • 1
  • 7
  • 27
  • 1
    possible duplicate of https://stackoverflow.com/questions/27862407/swagger-inheritance-and-composition and swagger 2.0 has allof https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#composition-and-inheritance-polymorphism – Grinish Nepal Mar 16 '19 at 05:02

0 Answers0