a guest Apr 7th, 2020 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def create_doc(doc: Dict[str, Any], HYDRUS_SERVER_URL: str = None,
- API_NAME: str = None) -> HydraDoc:
- """Create the HydraDoc object from the API Documentation.
- SyntaxError: If the `doc` doesn't have an entry for `@id` key.
- SyntaxError: If the `@id` key of the `doc` is not of
- the form : '[protocol] :// [base url] / [entrypoint] / vocab'
- # Check @id
- id_ = doc["@id"]
- except KeyError:
- raise SyntaxError("The API Documentation must have [@id]")
RAW Paste Data