Skip to content
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

Introduce UBI Spec 1.2.0 #28

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@

To generate the docs:
#### To generate the docs:

```
npm install -g @adobe/jsonschema2md

jsonschema2md -d schema -o docs/schema
# generated output for whole folder is written to ./docs/schema
```

OR

```
pip install json-schema-for-humans

/Users/epugh/.asdf/installs/python/3.9.17/bin/generate-schema-doc --config-file jsfh-conf.yaml /Users/epugh/Documents/projects/ubi/schema/1.1.0/ /Users/epugh/Documents/projects/ubi/docs/html/1.1.0
export UBI_VERSION=1.2.0

mkdir docs/html/${UBI_VERSION}
/Users/epugh/.asdf/installs/python/3.9.17/bin/generate-schema-doc --config-file jsfh-conf.yaml ./schema/$UBI_VERSION/ ./docs/html/$UBI_VERSION
# generated html for whole folder is written to ./docs/html

```

We then check them into Github.
https://o19s.github.io/blob/main/docs/


https://o19s.github.io/blob/main/docs/
#### To release UBI

1. Make sure to copy the last version (i.e. `schema/1.2.0)` to the next version (i.e. `schema/1.3.0`)
1. Make sure to update the version information in each .json file.
1. Build the docs into ./docs/html/1.3.0
1. Update the home README.md file to point to the new version.
24 changes: 24 additions & 0 deletions docs/html/1.2.0/event.schema.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/html/1.2.0/query.request.schema.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/html/1.2.0/query.response.schema.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang=en> <head><link rel=stylesheet type=text/css href="https://fonts.googleapis.com/css?family=Overpass:300,400,600,800"><script src=https://code.jquery.com/jquery-3.4.1.min.js integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin=anonymous></script><link href=https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css rel=stylesheet integrity=sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T crossorigin=anonymous><script src=https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js integrity=sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM crossorigin=anonymous></script><link rel=stylesheet type=text/css href=schema_doc.css><script src=https://use.fontawesome.com/facf9fa52c.js></script><script src=schema_doc.min.js></script><meta charset=utf-8><title>Query Response When Using UBI</title></head> <body onload=anchorOnLoad(); id=root><div class=text-right> <button class="btn btn-primary" type=button data-toggle=collapse data-target=.collapse:not(.show) aria-expanded=false>Expand all</button> <button class="btn btn-primary" type=button data-toggle=collapse data-target=.collapse.show aria-expanded=false>Collapse all</button> </div> <div class=breadcrumbs></div> <h1>Query Response When Using UBI</h1><span class="badge badge-dark value-type">Type: object</span><br> <span class=description><p>Version 1.2.0; last updated 2024-??. The response to a query made by a user should support this schema.</p> </span> <div class=accordion id=accordionquery_id> <div class=card> <div class=card-header id=headingquery_id> <h2 class=mb-0> <button class="btn btn-link property-name-button" type=button data-toggle=collapse data-target=#query_id aria-expanded aria-controls=query_id onclick="setAnchor('#query_id')"><span class=property-name>query_id</span> <span class="badge badge-warning required-property">Required</span></button> </h2> </div> <div id=query_id class="collapse property-definition-div" aria-labelledby=headingquery_id data-parent=#accordionquery_id> <div class="card-body pl-5"> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#query_id onclick="anchorLink('query_id')">query_id</a></div><br> <span class=description><p>The unique identifier of a query, typically a UUID, but can be any string.</p> </span><div class=one-of-value id=query_id_oneOf><h2 class=handle> <label>One of</label> </h2><ul class="nav nav-tabs" id=tabsquery_id_oneOf_oneOf role=tablist><li class=nav-item> <a class="nav-link active oneOf-option" id=query_id_oneOf_i0 data-toggle=tab href=#tab-pane_query_id_oneOf_i0 role=tab onclick="setAnchor('#query_id_oneOf_i0')">Option 1</a> </li><li class=nav-item> <a class="nav-link oneOf-option" id=query_id_oneOf_i1 data-toggle=tab href=#tab-pane_query_id_oneOf_i1 role=tab onclick="setAnchor('#query_id_oneOf_i1')">Option 2</a> </li></ul> <div class="tab-content card"><div class="tab-pane fade card-body active show" id=tab-pane_query_id_oneOf_i0 role=tabpanel> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#query_id onclick="anchorLink('query_id')">query_id</a> <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#query_id_oneOf onclick="anchorLink('query_id_oneOf')">oneOf</a> <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#query_id_oneOf_i0 onclick="anchorLink('query_id_oneOf_i0')">item 0</a></div><span class="badge badge-dark value-type">Type: string</span><span class="badge badge-info value-type">Format: uuid</span><br> <br> <div class="badge badge-secondary">Example:</div> <br><div id=query_id_oneOf_i0_ex1 class="jumbotron examples"><div class=highlight><pre><span></span><span class=s2>&quot;00112233-4455-6677-8899-aabbccddeeff&quot;</span>
</pre></div> </div> </div><div class="tab-pane fade card-body " id=tab-pane_query_id_oneOf_i1 role=tabpanel> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#query_id onclick="anchorLink('query_id')">query_id</a> <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#query_id_oneOf onclick="anchorLink('query_id_oneOf')">oneOf</a> <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#query_id_oneOf_i1 onclick="anchorLink('query_id_oneOf_i1')">item 1</a></div><span class="badge badge-dark value-type">Type: string</span><br> <p><span class="badge badge-light restriction max-length-restriction" id=query_id_oneOf_i1_maxLength>Must be at most <code>100</code> characters long</span></p> <br> <div class="badge badge-secondary">Example:</div> <br><div id=query_id_oneOf_i1_ex1 class="jumbotron examples"><div class=highlight><pre><span></span><span class=s2>&quot;1234-user-5678&quot;</span>
</pre></div> </div> </div></div></div> </div> </div> </div> </div> <footer> <p class=generated-by-footer>Generated using <a href=https://github.com/coveooss/json-schema-for-humans>json-schema-for-humans</a> on 2024-10-23 at 13:27:45 -0400</p> </footer></body> </html>
181 changes: 181 additions & 0 deletions docs/html/1.2.0/schema_doc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
body {
font: 16px/1.5em "Overpass", "Open Sans", Helvetica, sans-serif;
color: #333;
font-weight: 300;
padding: 40px;
}

.btn.btn-link {
font-size: 18px;
user-select: text;
}

.jsfh-animated-property {
animation: eclair;
animation-iteration-count: 1;
animation-fill-mode: forwards;
animation-duration: .75s;

}

@keyframes eclair {
0%,100% {
transform: scale(1);
}
50% {
transform: scale(1.03);
}
}

.btn.btn-primary {
margin: 10px;
}

.btn.example-show.collapsed:before {
content: "show"
}

.btn.example-show:before {
content: "hide"
}

.description.collapse:not(.show) {
max-height: 100px !important;
overflow: hidden;

display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

.description.collapsing {
min-height: 100px !important;
}

.collapse-description-link.collapsed:after {
content: '+ Read More';
}

.collapse-description-link:not(.collapsed):after {
content: '- Read Less';
}

.badge {
font-size: 100%;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
}

.badge.value-type {
font-size: 120%;
margin-right: 5px;
margin-bottom: 10px;
}


.badge.default-value {
font-size: 120%;
margin-left: 5px;
margin-bottom: 10px;
}

.badge.restriction {
display: inline-block;
}

.badge.required-property,.badge.deprecated-property,.badge.pattern-property,.badge.no-additional {
font-size: 100%;
margin-left: 10px;
}

.accordion div.card:only-child {
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.examples {
padding: 1rem !important;
}

.examples pre {
margin-bottom: 0;
}

.highlight.jumbotron {
padding: 1rem !important;
}

.generated-by-footer {
margin-top: 1em;
text-align: right;
}

/* From https://github.com/richleland/pygments-css/blob/master/friendly.css, see https://github.com/trentm/python-markdown2/wiki/fenced-code-blocks */
.highlight { background: #e9ecef; } /* Changed from #f0f0f0 in the original style to be the same as bootstrap's jumbotron */
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #40a070 } /* Literal.Number */
.highlight .s { color: #4070a0 } /* Literal.String */
.highlight .na { color: #4070a0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60add5 } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287e } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #40a070 } /* Literal.Number.Bin */
.highlight .mf { color: #40a070 } /* Literal.Number.Float */
.highlight .mh { color: #40a070 } /* Literal.Number.Hex */
.highlight .mi { color: #40a070 } /* Literal.Number.Integer */
.highlight .mo { color: #40a070 } /* Literal.Number.Oct */
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #06287e } /* Name.Function.Magic */
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */
2 changes: 1 addition & 1 deletion schema/1.1.0/event.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"examples": ["5e3b2a1c-8b7d-4f2e-a3d4-c9b2e1f3a4b5"]
},
"timestamp": {
"description": "When the event took place.",
"description": "When the event took place. This timestamp is formatted according to the ISO 8601 standard.",
"type": "string",
"format": "date-time",
"examples": ["2018-11-13T20:20:39+00:00"]
Expand Down
Loading