Skip to content

Commit

Permalink
add typecodes enpoint
Browse files Browse the repository at this point in the history
unauthenticated.

closes #385
  • Loading branch information
dwinston committed Nov 16, 2023
1 parent 76b9f73 commit 5668aee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nmdc_runtime/api/endpoints/nmdcschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import pymongo
from fastapi import APIRouter, Depends, HTTPException

from nmdc_runtime.minter.config import typecodes
from nmdc_runtime.util import nmdc_database_collection_names
from pymongo.database import Database as MongoDatabase
from starlette import status
Expand Down Expand Up @@ -37,6 +39,11 @@ def get_nmdc_schema_version():
return version("nmdc_schema")


@router.get("/nmdcschema/typecodes")
def get_nmdc_schema_typecodes():
return typecodes()


@router.get("/nmdcschema/collection_stats")
def get_nmdc_database_collection_stats(
mdb: MongoDatabase = Depends(get_mongo_db),
Expand Down

0 comments on commit 5668aee

Please sign in to comment.