Skip to content

Commit

Permalink
Add documentation for validating annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasyu888 committed Aug 27, 2023
1 parent 7923ce3 commit 06a18ed
Show file tree
Hide file tree
Showing 32 changed files with 1,358 additions and 117 deletions.
44 changes: 25 additions & 19 deletions docs/articles/validate_annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
Validate Annotations
********************

.. warning::
This is a beta implementation and is subject to change. Use at your own risk.

Validate annotations on your Synapse entities by leveraging the JSON schema services.
Here are the steps you must take to set up the JSON Schema service.


Create a JSON Schema organization
=================================

Expand Down Expand Up @@ -45,6 +49,7 @@ Manage a specific version of a JSON schema::


Create a new JSON schema version for an existing organization::

from random import randint
rint = randint(0, 100000)
org_name = "bgrande.test"
Expand Down Expand Up @@ -74,22 +79,23 @@ Test validation on a Synapse entity::
js.validation_stats(synapse_id)
js.unbind_json_schema(synapse_id)

# Access to low-level API functions
# js.create_organization(organization_name)
# js.get_organization(organization_name)
# js.list_organizations()
# js.delete_organization(organization_id)
# js.get_organization_acl(organization_id)
# js.update_organization_acl(organization_id, resource_access, etag)
# js.list_json_schemas(organization_name)
# js.list_json_schema_versions(organization_name, json_schema_name)
# js.create_json_schema(json_schema_body, dry_run)
# js.get_json_schema_body(json_schema_uri)
# js.delete_json_schema(json_schema_uri)
# js.json_schema_validation(json_schema_uri)
# js.bind_json_schema_to_entity(synapse_id, json_schema_uri)
# js.get_json_schema_from_entity(synapse_id)
# js.delete_json_schema_from_entity(synapse_id)
# js.validate_entity_with_json_schema(synapse_id)
# js.get_json_schema_validation_statistics(synapse_id)
# js.get_invalid_json_schema_validation(synapse_id)
Access to low-level API functions::

js.create_organization(organization_name)
js.get_organization(organization_name)
js.list_organizations()
js.delete_organization(organization_id)
js.get_organization_acl(organization_id)
js.update_organization_acl(organization_id, resource_access, etag)
js.list_json_schemas(organization_name)
js.list_json_schema_versions(organization_name, json_schema_name)
js.create_json_schema(json_schema_body, dry_run)
js.get_json_schema_body(json_schema_uri)
js.delete_json_schema(json_schema_uri)
js.json_schema_validation(json_schema_uri)
js.bind_json_schema_to_entity(synapse_id, json_schema_uri)
js.get_json_schema_from_entity(synapse_id)
js.delete_json_schema_from_entity(synapse_id)
js.validate_entity_with_json_schema(synapse_id)
js.get_json_schema_validation_statistics(synapse_id)
js.get_invalid_json_schema_validation(synapse_id)
4 changes: 2 additions & 2 deletions docs/build/html/api/Activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ <h2>Activity<a class="headerlink" href="#activity" title="Permalink to this head

<div role="contentinfo">
<p>&#169; Copyright 2012-2023, Sage Bionetworks.
<span class="lastupdated">Last updated on Aug 13, 2023.
<span class="lastupdated">Last updated on Aug 26, 2023.
</span></p>
</div>

Expand All @@ -268,7 +268,7 @@ <h2>Activity<a class="headerlink" href="#activity" title="Permalink to this head
</script>
<div class="footer">
&copy; <a href="http://sagebase.org/">Sage Bionetworks</a>.
Last updated on Aug 13, 2023.
Last updated on Aug 26, 2023.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions docs/build/html/api/Annotations.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headli

<div role="contentinfo">
<p>&#169; Copyright 2012-2023, Sage Bionetworks.
<span class="lastupdated">Last updated on Aug 13, 2023.
<span class="lastupdated">Last updated on Aug 26, 2023.
</span></p>
</div>

Expand All @@ -220,7 +220,7 @@ <h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headli
</script>
<div class="footer">
&copy; <a href="http://sagebase.org/">Sage Bionetworks</a>.
Last updated on Aug 13, 2023.
Last updated on Aug 26, 2023.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions docs/build/html/api/Client.html
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ <h2>More information<a class="headerlink" href="#more-information" title="Permal

<div role="contentinfo">
<p>&#169; Copyright 2012-2023, Sage Bionetworks.
<span class="lastupdated">Last updated on Aug 13, 2023.
<span class="lastupdated">Last updated on Aug 26, 2023.
</span></p>
</div>

Expand All @@ -1665,7 +1665,7 @@ <h2>More information<a class="headerlink" href="#more-information" title="Permal
</script>
<div class="footer">
&copy; <a href="http://sagebase.org/">Sage Bionetworks</a>.
Last updated on Aug 13, 2023.
Last updated on Aug 26, 2023.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions docs/build/html/api/Entity.html
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ <h2>Properties and annotations, implementation details<a class="headerlink" href

<div role="contentinfo">
<p>&#169; Copyright 2012-2023, Sage Bionetworks.
<span class="lastupdated">Last updated on Aug 13, 2023.
<span class="lastupdated">Last updated on Aug 26, 2023.
</span></p>
</div>

Expand All @@ -482,7 +482,7 @@ <h2>Properties and annotations, implementation details<a class="headerlink" href
</script>
<div class="footer">
&copy; <a href="http://sagebase.org/">Sage Bionetworks</a>.
Last updated on Aug 13, 2023.
Last updated on Aug 26, 2023.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions docs/build/html/api/Evaluation.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h2>Submission Status<a class="headerlink" href="#submission-status" title="Perm

<div role="contentinfo">
<p>&#169; Copyright 2012-2023, Sage Bionetworks.
<span class="lastupdated">Last updated on Aug 13, 2023.
<span class="lastupdated">Last updated on Aug 26, 2023.
</span></p>
</div>

Expand All @@ -298,7 +298,7 @@ <h2>Submission Status<a class="headerlink" href="#submission-status" title="Perm
</script>
<div class="footer">
&copy; <a href="http://sagebase.org/">Sage Bionetworks</a>.
Last updated on Aug 13, 2023.
Last updated on Aug 26, 2023.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
<script type="text/javascript">
Expand Down
Loading

0 comments on commit 06a18ed

Please sign in to comment.