Advertisement
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.
- Raises:
- 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
- try:
- id_ = doc["@id"]
- except KeyError:
- raise SyntaxError("The API Documentation must have [@id]")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement