DEV Community

Discussion on: Defining reusable components with the OpenAPI specification

Collapse
 
elmuerte profile image
Michiel Hendriks

Why overload the the semantics of path and not simply add a "fragment: true" to the info object? ("x-fragment" until it is adopted in the standard)

Sure, it does not make much sense to have an API with no paths. But it will make it explicit that the specification is a fragment.

Collapse
 
mikeralphson profile image
Mike Ralphson

The presence of paths: {} isn't intended to overload the meaning, it's because paths is a mandatory object in the OAS (2.0 and 3.0.x), although it can be empty.

x-fragment is a good idea to make that explicit.