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
Hi,
I'm having trouble using the import: "some.yaml" function in yaml files. I'm using a setup where the API descriptions are in separate files and I use Blueprints to define the API itself. I'd like to remove a lot of redundancy in parameters by using $ref and it would be great to use the import option in the yaml files so I can easily reference the parameters, allowed values across the API.
After a lot of debugging I ended up with there must be some issues around how root_path is used when reading the yaml files and attempting to parse and include the imported yamls.
I ended up changing this line to use the obj.root_path whenever exists and fallback to the get_root_path function if it does not. With this change now I can successfully import yamls files by using relative paths.
Do you think it makes sense to add this change to the code, or there is a well-known reason behind the current implementation? Alternatively I might miss some configuration that would solve this issue instantly...
Thanks a lot!
--Attila
The text was updated successfully, but these errors were encountered:
Hi,
I'm having trouble using the
import: "some.yaml"
function in yaml files. I'm using a setup where the API descriptions are in separate files and I use Blueprints to define the API itself. I'd like to remove a lot of redundancy in parameters by using$ref
and it would be great to use theimport
option in the yaml files so I can easily reference the parameters, allowed values across the API.After a lot of debugging I ended up with there must be some issues around how
root_path
is used when reading the yaml files and attempting to parse and include the imported yamls.I ended up changing this line to use the
obj.root_path
whenever exists and fallback to theget_root_path
function if it does not. With this change now I can successfully import yamls files by using relative paths.flasgger/flasgger/utils.py
Line 637 in 3c16b77
Do you think it makes sense to add this change to the code, or there is a well-known reason behind the current implementation? Alternatively I might miss some configuration that would solve this issue instantly...
Thanks a lot!
--Attila
The text was updated successfully, but these errors were encountered: