-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expansion of JSONLD and parsing of API DOC #42
Expansion of JSONLD and parsing of API DOC #42
Conversation
@priyanshunayan Is this ready for review? |
279f230
to
760c1df
Compare
for title in item[hydra['title']]: | ||
_title = title['@value'] | ||
if hydra['description'] in item: | ||
for description in item[hydra['description']]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there for loops here? The root dictionary will have only one key with hydra:description right? Is this a limitation of pyld?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the limitation of pyld. The expansion algorithm itself returns everything as list. Hence, have to loop even though there is one element in the list.
Please rebase so we can merge |
9052471
to
b9964dc
Compare
* add collections array to the entrypoint * add default manages block * allow configurable collection names * fix tests and pep8 format * add entrypoint property to the apidoc * add example of manages block in sample * fix id literal * fix id literal and generate sample doc * Add support for POST and DELETE on collection classes (#46) * Add support for POST and DELETE on collection classes As the collection will now be treated as a resource, we need to add support for POST and DELETE on collection/:uuid endpoint * Default readable and writable attributes of member property to True * Fix PEP8 errors * Discover collections in doc_maker.py (#41) * remove hardcoding of Collection keyword Remove hardcoding of "Collection" keyword for checking if a class is a collection. Check either using 'collection' property defined in 'EntryPoint' or 'manages' property defined in that class * Fix tests Use get_endpoint_and_path function instead of class_in_endpoint or collection_in_endpoint as they are changed to get_endpoint_and_path function * Remove dependency of class collection (#45) * add method for adding HydraCollection * Remove dependency of collection on classes 🎉 * Remove unnecessary comments * add missing context * Bring class uris to the apidoc url namespace * Give user option to chose the location of the apidoc * Make sure identifiers are inside the apidoc namespace * fix ids of supported Operations * Expansion of JSONLD and parsing of API DOC (#42) * [WIP] expand jsonld and use hydra namespace * Extract endpoint classes and collections * add comments * Store Link ids in the endpoints. * make HydraClass for classes endpoints * finish parsing of expanded apidoc 🎉 * Write new tests * resolve conflicts, make minor changes * add ids for base classes, * Add Docs (#47) * add docs with sphinx * add readthedocs yml and requirements.txt * change version * change sys.path * Bug Fixes (#48) * Add the namespace test and fix test due to adding of new manages block * Add base classes just once * place instantation at the right place * Case sensitive URLs * fix tests * avoid rewriting of the collections array * Parse HydraLinks in context * entrypoint uri correct Co-authored-by: Priyanshu Nayan <priyanshunayan456@gmail.com> Co-authored-by: Samesh Lakhotia <43701530+sameshl@users.noreply.github.com>
Related #38, #37
Checklist
Description
This PR expands the JSONLD to extract the required properties to make HydraDoc. This is more robust solution while parsing external APIDOCs.
Change logs