You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a project where I have an openAPI spec which is organised as a folder. I've been experimenting with using this library to generate schemas only, which has been working great for my use case! But I have found the $ref is hardcoded to assume the spec is only using local references, meaning i currently have to manually update each file.
Proposal
I thought it might be good to have a argument on generateComponents that controls the reference type (local/remote/server), as per the swagger guidance Using $ref. Scope may be wider to make it compatible with the whole library? Happy to make a PR myself
The text was updated successfully, but these errors were encountered:
@rhysdoliver thank you for the suggestion. I do think this makes sense. I think we've thought about providing a "base path" of where documents are being stored. I.e not necessarily under /components or /schemas.
And yes such a task should ideally be done for the whole library - meaning both v3 and v3.1 and also for generateComponents and generateDocument. One thing that comes to mind is that this can be done with an optional second parameter to the Generator constructor and it would influence both behaviors.
Problem
I'm currently working on a project where I have an openAPI spec which is organised as a folder. I've been experimenting with using this library to generate schemas only, which has been working great for my use case! But I have found the $ref is hardcoded to assume the spec is only using local references, meaning i currently have to manually update each file.
Proposal
I thought it might be good to have a argument on generateComponents that controls the reference type (local/remote/server), as per the swagger guidance Using $ref. Scope may be wider to make it compatible with the whole library? Happy to make a PR myself
The text was updated successfully, but these errors were encountered: