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

Example Health URL scheme with GET, single POST and batch POSTs #232

Merged
merged 5 commits into from
Aug 18, 2021

Conversation

cookeac
Copy link
Collaborator

@cookeac cookeac commented Jul 30, 2021

Resolves #154

  • Adds healthURLScheme.json (OpenAPI example for animal health events)
  • Adds icarBatchResult.json - results for batch POSTs
  • Replaces icarErrorResource.json with icarErrorWarningMessageResource.json which is used for errors but also errors and warnings in batch results.
  • Adds icarBatchResultSeverityType.json to provide an enumeration for error, warning, and informational messages.

In usage:

  • GET methods function as they do in exampleURLScheme.json
  • Single POST methods take a single resource and return the updated resource if successful, else an array of error/warnings.
  • Batch POST methods take an array of resources and return a matching array of batch results, with the original metadata for matching, the updated resource IDs (where added successfully) and/or an array of errors and warnings for each resource.

Renamed icarErrorResource to icarBatchResultMessage, and added icarBatchResultSeverityType enum.
Batch POSTS now always return an array of icarBatchResult, each of which may contain an array of icarErrorWarningMessageResource.

Single POSTs if successful return the posted object (ID filled in), otherwise they return an errors array of icarErrorWarningMessageResource.

Sorry for renaming the file, but it helped to clarify its purpose.
@cookeac cookeac requested a review from alamers July 30, 2021 02:03
@ahokkonen ahokkonen self-requested a review July 30, 2021 09:17
Copy link
Contributor

@ahokkonen ahokkonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one comment

@@ -0,0 +1,35 @@
{
"description": "An RFC7807 compliant problem response for JSON APIs.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could "icarResponseMessageResource"/"icarProblemResponseMessageResource" be a better name for that resource? As we also have "Information" severity level defined for message type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent suggestion, thank you. I struggled with the naming of that resource. Renamed to icarResponseMessageResource.

Renamed icarErrorWarningMessage Resource to icarResponseMessageResource based on feedback to PR adewg#232
Copy link
Contributor

@ahokkonen ahokkonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect now 👍🏻 Great work!

@cookeac cookeac requested review from AndreasSchultzGEA and removed request for alamers August 17, 2021 23:24
Copy link
Collaborator

@AndreasSchultzGEA AndreasSchultzGEA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I had no closer look at the UrlScheme, but the other parts look fine.

@cookeac cookeac merged commit 05a9088 into adewg:Develop Aug 18, 2021
@cookeac cookeac deleted the cookeac-master branch August 27, 2021 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants