javanile / yamlinc

Compose multiple YAML files into one with $include tag. Split Swagger/OpenAPI into multiple YAML files.
MIT License
114 stars 22 forks source link

Can I use this tool to merge two openapi specs? #12

Open lezhnev74 opened 5 years ago

lezhnev74 commented 5 years ago

Hi! Let's say that two people develop two independent API documents (each has standard openapi schema: openapi, info, paths). Does this tool merge these two files into a single openapi spec?

francescobianco commented 5 years ago

Hi!

Yes, you can do it. A possible approach is: create a file with include list

## marge-all-this-files.yml
$include: api-spec-from-jhon.yml
$include: api-spec-from-mark.yml
$include: api-spec-from-erik.yml

now run yamlinc

$ yamlinc marge-all-this-files.yml