Skip to content

Question: NBN Atlas API response objects - ideas/advice wanted #18

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

Open
h-m-jones opened this issue Aug 20, 2023 · 1 comment
Open

Question: NBN Atlas API response objects - ideas/advice wanted #18

h-m-jones opened this issue Aug 20, 2023 · 1 comment

Comments

@h-m-jones
Copy link
Contributor

The NBN Atlas API often returns a lot of JSON. For non-scientific applications, much of the JSON data is not needed. This is certainly case for our simple to use React components. Therefore simple DTO's could be defined for use in components.

Lets start with the JSON returned from "Occurrence search end point" Example:

https://records-ws.nbnatlas.org/occurrences/search?q=:&fq=data_provider_uid:dp7

The question is, how are these response objects defined.

  1. They should be in a separate package (common library) for use outside of the react components package, e.g for use also in an eExpo package, or perhaps a future "practice angular" package
  2. Can we use swagger
  3. What about Zod
  4. Should it be typescript or JSDoc?

Any thoughts?

@h-m-jones h-m-jones converted this from a draft issue Aug 20, 2023
@h-m-jones h-m-jones added help wanted Extra attention is needed question Further information is requested labels Aug 20, 2023
@h-m-jones
Copy link
Contributor Author

Decided upon Zod and TypeScript.

TemplateDataFetchingComponent is template component showing how everything works together to parse the API response.

@h-m-jones h-m-jones removed help wanted Extra attention is needed question Further information is requested labels Aug 29, 2023
@h-m-jones h-m-jones moved this from Todo to Done in NBN Atlas React Components Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant