-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example \ support for embedded files #72
Labels
Comments
This is an interesting use case. It looks like that is not possible to load directly this as a file at the moment, since the current loaders use There are in my view 2 ways to work this out:
|
fredbi
added a commit
to fredbi/swag
that referenced
this issue
Mar 18, 2025
This PR deprecates package-level configurations for the HTTP or file loader utility, by introducing a set of options. It is a non-breaking change, as package-level variables are still consumed as the default options. Besides existing configurations (timeout, basic auth, custom headers), we add the possibility to inject a custom http client. For the local file loader, we add the possibility to inject a FS, for example to be used with a dir-rooted FS or an embedded FS. * contributes go-openapi/loads#72 * refactored and augmented loading tests, with t.Run for improved test readability Signed-off-by: Frederic BIDON <[email protected]> Signed-off-by: Frederic BIDON <[email protected]>
fredbi
added a commit
to fredbi/swag
that referenced
this issue
Mar 19, 2025
This PR deprecates package-level configurations for the HTTP or file loader utility, by introducing a set of options. It is a non-breaking change, as package-level variables are still consumed as the default options. Besides existing configurations (timeout, basic auth, custom headers), we add the possibility to inject a custom http client. For the local file loader, we add the possibility to inject a FS, for example to be used with a dir-rooted FS or an embedded FS. * contributes go-openapi/loads#72 * refactored and augmented loading tests, with t.Run for improved test readability Signed-off-by: Frederic BIDON <[email protected]> Signed-off-by: Frederic BIDON <[email protected]>
fredbi
added a commit
to go-openapi/swag
that referenced
this issue
Mar 22, 2025
…104) * feat(loading): HTTP or file loader configurable with LoadingOptions This PR deprecates package-level configurations for the HTTP or file loader utility, by introducing a set of options. It is a non-breaking change, as package-level variables are still consumed as the default options. Besides existing configurations (timeout, basic auth, custom headers), we add the possibility to inject a custom http client. For the local file loader, we add the possibility to inject a FS, for example to be used with a dir-rooted FS or an embedded FS. * contributes go-openapi/loads#72 * refactored and augmented loading tests, with t.Run for improved test readability Signed-off-by: Frederic BIDON <[email protected]> Signed-off-by: Frederic BIDON <[email protected]> * Update loading.go Co-authored-by: ccoVeille <[email protected]> --------- Signed-off-by: Frederic BIDON <[email protected]> Co-authored-by: ccoVeille <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm trying to serve embedded yaml file, but this is not possible ?
Can't see any example or intuitively clear way to do so.
The text was updated successfully, but these errors were encountered: