[RMB-43] document HTTP status codes Created: 26/Jun/17  Updated: 06/Feb/20  Resolved: 10/Jul/17

Status: Closed
Project: RAML Module Builder
Components: None
Affects versions: None
Fix versions: 13.0.0

Type: New Feature Priority: P2
Reporter: Julian Ladisch Assignee: Julian Ladisch
Resolution: Done Votes: 0
Labels: core, sprint17, team1, team2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
is blocked by RMB-40 extract ResourceUtil.asString(...), I... Closed
Relates
relates to CIRCSTORE-191 Review and Possibly Replace HttpURLCo... Open
relates to FOLIO-698 document RESTful API guidelines for m... Draft
relates to CIRCSTORE-8 Implement a Loan Rules web service en... Closed
Sprint:

 Description   

Add a section to
https://github.com/folio-org/raml-module-builder/blob/5d8637d9d4939e9e056dc78c5ce4d3dcb97e9680/README.md#step-1-describe-the-apis-to-be-exposed-by-the-new-module
documenting what the usually used HTTP status codes are.
For example 200 for successful GET, 204 for successful POST, PUT and DELETE, 422 for validation error.

Add an enum to rmb with those status codes.



 Comments   
Comment by Julian Ladisch [ 29/Jun/17 ]

https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html#field.summary contains some HTTP status codes, but 422 is missing, and they are int constants without the type safety of an enum.

http://vertx.io/docs/apidocs/io/vertx/core/http/HttpMethod.html is an enum of HTTP methods (like GET, POST, PATCH) but does not contain HTTP status codes like 200, 204, 422.

Comment by Julian Ladisch [ 06/Jul/17 ]

The proposed enum HttpStatus.java in https://github.com/folio-org/raml-module-builder/pull/95 is a replacement for classes and constant definitions like
https://github.com/folio-org/mod-circulation-storage/blob/46f8a0d/src/test/java/org/folio/rest/support/AdditionalHttpStatusCodes.java

Comment by shale99 [ 09/Jul/17 ]

merged. closing issue and assigning fixed version

Comment by shale99 [ 09/Jul/17 ]

can someone change the fixed version to 13.0.0? for some reason i can not edit it

Comment by Julian Ladisch [ 10/Jul/17 ]

The Jira project "folio" doesn't have version numbers.

The enum HttpStatus.java is in raml-module-builder from version 13.0.0 on:
https://github.com/folio-org/raml-module-builder/pull/95/files

Comment by Marc Johnson [ 10/Jul/17 ]

As this turned into a change inside in the RAML-module-builder, I've moved it back to the RAML Module Builder JIRA project

Generated at Thu Feb 08 23:07:40 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.