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

Revalidate unAPI status codes #31

Closed
4 tasks done
vanch3d opened this issue Feb 6, 2018 · 2 comments
Closed
4 tasks done

Revalidate unAPI status codes #31

vanch3d opened this issue Feb 6, 2018 · 2 comments
Assignees

Comments

@vanch3d
Copy link
Owner

vanch3d commented Feb 6, 2018

Both /unapi and /unapi?id={pub}&format={format} with correct parameters are considered successful requests and currently respond with a 200 status.
The last version of the unAPI documentation has a cryptic comment:

302 Found for responses to the UNAPI?id=IDENTIFIER&format=FORMAT function which redirect
https://web.archive.org/web/20070107163855/http://unapi.info/specs/unapi-version-1.html

but no mention of redirection in the description of the body.
However, revision 1 of the documentation clearly states:

3. UNAPI?uri=URI&format=FORMAT
[...]
Redirects the user to the object specified by URI in the format specified by FORMAT. The content-type should be the content-type specified in the element within the unAPI format response for this format.
https://web.archive.org/web/20070102033638/http://unapi.info:80/specs/unapi-revision-1.html

/unapi?id={pub}&format={format} should be changed to 302


  • validate all status codes
  • fix the API handler
  • fix Swagger accordingly
  • fix all <abbr> identifiers in the templates
@vanch3d vanch3d self-assigned this Feb 6, 2018
@vanch3d
Copy link
Owner Author

vanch3d commented Feb 6, 2018

It will also help with the Swagger description (see #30), making sure every possible response schema is unique and has a unique code

@vanch3d vanch3d closed this as completed Feb 6, 2018
@vanch3d vanch3d reopened this Feb 6, 2018
@vanch3d
Copy link
Owner Author

vanch3d commented Feb 6, 2018

<abbr> identifiers are still using the publication.id rather than publication.archive_location

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

1 participant