-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Duplicate resource URLs not handled #203
Comments
@foxx Can you give us the complete blueprint which is failing to detect a duplicate URL? Thanks. |
Hey @foxx a bigger example would be good – are those endpoints nested under a resource or not?
Bottom line note: I am starting to question whether this is a correct behavior (constraining the designs to be resource - oriented only). See a possibly related discussion at #198 (comment) |
I've been able to reproduce this with a clean blueprint, and it seems that a warning is already being raised. Should I close this ticket out, or is it still a valid problem?
|
@foxx The parser will give warnings for duplicate URLs. You created the issue because you said that snowcrash doesn't detect duplicate URL which I think is a bug. Is there a blueprint where that happens?
What do you mean by that? |
Sorry, this was a huge user error on my part. It would seem that I did not properly check the warnings output when I initially posted this issue, as when I tried to reproduce it on the web editor the warning was clearly displayed, and when I re-checked There could be legit situations where duplicate URLs are allowed I guess, therefore I'm going to mark the issue as closed. Apologies for wasting your time on this guys :( |
No worries @foxx 😄 |
If I specify the same resource URL twice, Snowcrash doesn't seem to detect that there is a duplicate;
I checked the specification and I cannot seem to find anything on how duplicate resource URLs are handled. In our use case, the only time there would be a duplicate resource URL would be in the event of human error, and I'm struggling to think of any situation where an API Blueprint would need to support duplicates.
On that basis, I'd like to suggest an amendment to the specification which checks if any duplicates exist, and raises an error (or at the very least a warning).
Thoughts?
The text was updated successfully, but these errors were encountered: