The following changes are proposed for migrating API from V1 to V2:
All response data types should follow camel casing.
All request inputs should follow camel casing.
Move input fields from headers to query or body as seems appropriate.
If the field is not going to contain a large amount of data, the query is an appropriate location. However, the body can also be used.
E.g.: name, id, shortName, etc.
If the field can accept a large amount of data, the body is the appropriate location.
E.g.: refText, licenseText, etc.
Use HTTP verbs instead of endpoints like /update.
Use page and size in query for pagination.
Create a response model for all response objects.
Bad classes and methods naming.
All classes should be in singular form.
All method names should not be repeating the className
Example : getPatientsByLocation should be getAllById();
All methods and classes' names should be in CamelCase.
The list is not exhaustive. Please feel free to add more ideas.
Update all the APIs to Version 2
REST APIs need to be improved to version 2.
The following changes are proposed for migrating API from V1 to V2:
All response data types should follow camel casing.
All request inputs should follow camel casing.
Move input fields from headers to query or body as seems appropriate.
If the field is not going to contain a large amount of data, the query is an appropriate location. However, the body can also be used. E.g.: name, id, shortName, etc.
If the field can accept a large amount of data, the body is the appropriate location. E.g.: refText, licenseText, etc.
Use HTTP verbs instead of endpoints like /update. Use page and size in query for pagination.
Create a response model for all response objects.
Bad classes and methods naming.
All classes should be in singular form.
All method names should not be repeating the className
Example : getPatientsByLocation should be getAllById();
All methods and classes' names should be in CamelCase.
The list is not exhaustive. Please feel free to add more ideas.