Skip to content
Snippets Groups Projects
Commit 08cc70e5 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Add sampleconfig endpoint

parent 00274aa0
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,11 @@ async def get_model_copyright(model_id: str, response:Response): ...@@ -73,6 +73,11 @@ async def get_model_copyright(model_id: str, response:Response):
requested_model = get_model_instance(model_id) requested_model = get_model_instance(model_id)
return requested_model.copyright if requested_model is not None else _result_or_404(None, model_id, response) return requested_model.copyright if requested_model is not None else _result_or_404(None, model_id, response)
@app.get("/models/{model_id}/sampleconfig/", response_class=PlainTextResponse, name="Get a sample configuration")
async def get_model_sampleconfig(model_id: str, response:Response):
requested_model = get_model_instance(model_id)
return requested_model.sample_config if requested_model is not None else _result_or_404(None, model_id, response)
@app.get("/models/{model_id}/warningstatusinterpretation/{language}/", response_class=PlainTextResponse, name="How to interpret the warning status (red-yellow-green, what does it mean?) in the specified language (<a href='http://www.loc.gov/standards/iso639-2/php/English_list.php'>ISO-639-2</a>)") @app.get("/models/{model_id}/warningstatusinterpretation/{language}/", response_class=PlainTextResponse, name="How to interpret the warning status (red-yellow-green, what does it mean?) in the specified language (<a href='http://www.loc.gov/standards/iso639-2/php/English_list.php'>ISO-639-2</a>)")
async def get_model_warning_status_interpretation(model_id: str, language: str, response:Response): async def get_model_warning_status_interpretation(model_id: str, language: str, response:Response):
return _result_or_404(_get_model_warning_status_interpretation(model_id, language), model_id, response) return _result_or_404(_get_model_warning_status_interpretation(model_id, language), model_id, response)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment