Exemplo n.º 1
0
def _add_mandatory_props(api: DataService, es_hit: Mapping) -> None:
    api.title = {"nb": es_hit["title"]}
    api.identifier = es_hit["id"]
    api.publisher = URI(os.environ["PUBLISHER"])
    if es_hit.get("master") == "NAV API PORTAL":
        api.landing_page = [os.environ["NAV_API_PORTAL"]]
Exemplo n.º 2
0
def _add_optional_props(api: DataService, es_hit: Mapping) -> None:
    api.publisher = URI(os.environ["PUBLISHER"])
    api.description = {"nb": es_hit["content"]["description"]}
    api.endpointURL = es_hit["content"]["url"]
    api.endpointDescription = es_hit["content"]["swagger"]