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

Document the /nmdcschema/typecodes API endpoint (reverse engineered) #748

Merged

Conversation

eecavanna
Copy link
Collaborator

@eecavanna eecavanna commented Nov 2, 2024

In this branch, I added some documentation to an API endpoint that lacked it. The API endpoint was introduced via #386 (to resolve issue #385).

Fixes #747

Type of change

  • Added missing documentation

How Has This Been Tested?

  • I read it back to myself and it made sense to me

Configuration Details: none

Definition of Done (DoD) Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas

@eecavanna eecavanna self-assigned this Nov 2, 2024
@eecavanna eecavanna linked an issue Nov 2, 2024 that may be closed by this pull request
@eecavanna eecavanna merged commit ecc63db into main Nov 4, 2024
2 checks passed
@eecavanna eecavanna deleted the 747-add-description-to-nmdcschematypecodes-api-endpoint branch November 4, 2024 18:08
Copy link
Collaborator

@sujaypatil96 sujaypatil96 left a comment

Choose a reason for hiding this comment

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

Sorry for the late review on this PR @eecavanna.

The docstring looks good, but I had a quick qualm with the /nmdcschema/typecodes endpoint itself, and I'm happy to make an issue for it.

So running:

curl -X 'GET' \
  'https://api.microbiomedata.org/nmdcschema/typecodes' \
  -H 'accept: application/json'

I'm seeing the below in the output:

  {
    "id": "nmdc:NucleotideSequencing_typecode",
    "schema_class": "nmdc:NucleotideSequencing",
    "name": "dgns"
  }

Under "name" ideally, I should see both dgns and omprc, so perhaps something like this:

  {
    "id": "nmdc:NucleotideSequencing_typecode",
    "schema_class": "nmdc:NucleotideSequencing",
    "name": "dgns"
  },
  {
    "id": "nmdc:NucleotideSequencing_typecode",
    "schema_class": "nmdc:NucleotideSequencing",
    "name": "omprc"
  }

Here's the line from the schema YAML that has indication that there are two typecodes associated with NucleotideSequencing.

Right?

@aclum
Copy link
Contributor

aclum commented Nov 4, 2024

This should be a different endpoint IMO, allowable typecodes will be different going forward that the current typecode the minter returns.

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.

Add description to /nmdcschema/typecodes API endpoint
3 participants