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
{{ message }}
Repository navigation
Inconsistent working directory: docs generation and "add entity" require different CWDs #7
Try to add a new entity from the same directory -> fails with:
no mdl-project.yml in my-model
cd .. (project root, outside my-model/)
Add a new entity -> works.
Try to generate documentation from the same directory -> fails with:
Error: /api/model: 404 {"detail":"no mdl-project.yaml in ."}
What you expected
Expected behaviour
Every command should work from inside the model folder (my-model/), which is
where the model actually lives and where mdl-project.yaml sits. Ideally the
project root is discovered by walking up from the current directory until an mdl-project.yaml is found, so both commands work from anywhere inside the
model tree.
Actual behaviour
Docs generation resolves the project relative to the current directory
(.) and 404s when run from the parent folder.
Add-entity resolves the project relative to the parent directory and fails
when run from inside the model folder.
Notes / suspected cause
Looks like a relative-path bug: the two code paths use different base
directories when resolving the project file, and neither of them walks up
the directory tree.
The two error messages also disagree on the file name: one says mdl-project.yml, the other mdl-project.yaml. The file on disk is mdl-project.yaml. If the add-entity path really looks for .yml, the
error message is misleading at best and a second bug at worst.
The no mdl-project.yml in my-model message is confusing on its own,
because my-model/mdl-project.yaml clearly does exist.
Desired outcome
I want to work exclusively inside my own model folder: adding entities,
generating documentation and everything else should run from my-model/
without having to change directories.
Activity