{"repo":"kota65535/openapi-merger","free":true,"listed":false,"github":"https://github.com/kota65535/openapi-merger","clone":"git clone https://github.com/kota65535/openapi-merger.git","description":"Merges multiple OpenAPI document files into a single file.","language":"JavaScript","stars":34,"topics":["openapi","swagger","openapi3"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"openapi-merger Yet another CLI tool for merging multiple OpenAPI files into a single file. Features - Similar to swagger-merger - Convert all remote & URL refs into local refs - This is useful on code generation, because it helps openapi-generator to output unique model classes without duplication. - $include keyword: same as $ref , except it merges the object with sibling elements. ( $ref ignores them) Usage $include keyword openapi-merger introduces the special keyword $include . It has similar syntax as $ref , which takes JSON reference as its value. The biggest difference is that $include replaces itself directly by the referenced content, allowing to merge its sibling elements. Merge objects & arrays If $include is used in an object and then referenced content is an object too, they are merged. - main.yml - object.yml - results in: Arrays go in the same manner. - main.yml - array.yml - results in: If you want not to merge arrays, use $include in a nested array. - main.yml - array.yml - results in: Multiple $include at same place $include can be used multiple times in the same place by appending # with some ID, avoiding key duplication. Key modification & Filtering $include is capable of modification and filtering of the keys of the referenced content. This is useful when you want to aggregate multiple OpenAPI documents of backend services into one for API Gateway. To utilize this function, a configuration file should be given by -c option. The configuration file is like ","default_branch":null,"files":null,"tree":[],"storefront":"/r/kota65535","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kota65535/openapi-merger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}