openapi2proto icon indicating copy to clipboard operation
openapi2proto copied to clipboard

External references are being inlined

Open elyashivlavi opened this issue 5 years ago • 0 comments

According to the fix was made in https://github.com/NYTimes/openapi2proto/issues/27, Now external references are being inlined. This means that if I have such a spec:

paths:
  /path1:
    parameters:
        - $ref: 'param1.yaml'
  /path2
    parameters:
       - $ref: 'param1.yaml'

Then I will end with 2 inner messages Param1 in the protofile, instead of reusing the existing one... Is this intentional? I assume it can be changed easily by adding external references to the 'definitions' section of the scheme, instead of inlining them (in external.go file). WDYT?

elyashivlavi avatar Nov 17 '19 09:11 elyashivlavi