j-d-carmichael / boats

Beautiful Open Api Template System
MIT License
57 stars 8 forks source link

Nested $refs inside optionalProps file not found error #37

Closed j-d-carmichael closed 1 year ago

j-d-carmichael commented 3 years ago

optionalProps helper i just hit a very irritating bug.

{{ optionalProps('../../user/model.yml') }}

Hits reference issues when your optionalProp file includes a $ref

The result will be that the optionalProp helper tries to resolve the nested $ref from the location of the said helper. This just results in an ugly error as the JSON Refs parser rightly cannot find the file. To make it even harder to debug.. if you have a double nested ref. the pointer seems to get really lost.