Skip to content
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

skosprovider route /expand does not work #903

Closed
Wim-De-Clercq opened this issue Jul 29, 2024 · 1 comment
Closed

skosprovider route /expand does not work #903

Wim-De-Clercq opened this issue Jul 29, 2024 · 1 comment
Assignees
Milestone

Comments

@Wim-De-Clercq
Copy link
Contributor

A call to /conceptschemes/1/c/1/expand does not resolve properly and returns 404.

Due to the change within atramhasis to support non-integer concept IDs, a change was also made to the concept route to allow forward slashes as the concept ID.

pattern='/conceptschemes/{scheme_id}/c/{c_id:.*}'

This causes the expand url (/conceptschemes/1/c/1/expand) to be read as: a concept with ID 1/expand instead of using the expand API.

The fix is simple, to declare the expand api route before concept route, because pyramid will use the routes in the order they are declared.
(the expand api exists in pyramid_skosprovider)

config.include('atramhasis.routes')  # move down
config.include('pyramid_skosprovider')   # move up
@Wim-De-Clercq
Copy link
Contributor Author

update: this a lot more complex because pyramid_skosprovider and atramhasis declare the same routes (path-wise) with different names.

@cedrikv cedrikv modified the milestones: Sprint 238, Sprint 239 Jul 29, 2024
Wim-De-Clercq added a commit that referenced this issue Jul 30, 2024
Atramhasis was duplicating a lot of routes declared
in pyramid_skosprovider and these conflicts caused
issues because the regex path params which use .*
would consume a bunch of routes which it should not.

Issue #903
Wim-De-Clercq added a commit that referenced this issue Jul 30, 2024
Atramhasis was duplicating a lot of routes declared
in pyramid_skosprovider and these conflicts caused
issues because the regex path params which use .*
would consume a bunch of routes which it should not.

Issue #903
@goessebr goessebr closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants