Commit 1fbdc77 1 parent 22e8f92 commit 1fbdc77 Copy full SHA for 1fbdc77
File tree 1 file changed +30
-1
lines changed
1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ const NamespaceDashboard = (props) => {
105
105
const SchemaList = ( props ) => {
106
106
const listItems = Object . values ( props . schemas ) . map ( schema => {
107
107
return < li key = { schema . schema } >
108
- < a className = "a" onClick = { ( ) => props . selectSchema ( schema . schema ) } > { schema . schema } </ a > -- { schema . description } < a href = { schema . url } > Download</ a >
108
+ < a href = { `/?namespace= ${ schema . namespace } &schema= ${ schema . schema } ` } className = "a" onClick = { ( e ) => { e . preventDefault ( ) ; props . selectSchema ( schema . schema ) ; } } > { schema . schema } </ a > -- { schema . description } < a href = { schema . url } > Download</ a >
109
109
</ li >
110
110
} )
111
111
console . log ( props . schemas )
@@ -144,7 +144,36 @@ const SchemaSelector = (props) => {
144
144
return (
145
145
< >
146
146
< h2 > Select namespace</ h2 >
147
+
147
148
< Select options = { namespaceList } onChange = { selectNamespace } />
149
+
150
+ < hr />
151
+
152
+ < h2 > Guide</ h2 >
153
+ This is a schema registry and API. It is hosted on GitHub Pages.
154
+ Schemas are identified by a < i > namespace</ i > and < i > schema name</ i > , put together to form a *registry path*, of this form:
155
+
156
+ < br /> < br />
157
+
158
+ < pre > < code > {namespace}/{schema}</ code > </ pre >
159
+
160
+ < h3 > Browsing</ h3 >
161
+
162
+ To browse existing schemas, select a namespace from the dropdown above. This will show you a list of all schemas in that namespace
163
+
164
+ < h3 > API</ h3 >
165
+
166
+ To access a schema via the API, use the following URL format:
167
+ < br /> < br />
168
+ < pre > < code > https://schema.databio.org/{namespace}/{schema}.yaml</ code > </ pre >
169
+
170
+ You can also get a list of schemas in a namespace via the API:
171
+
172
+ < br /> < br />
173
+
174
+ < pre > < code > https://schema.databio.org/{namespace}/schemas.json</ code > </ pre >
175
+
176
+ < h3 > Contributing</ h3 > You can contribute your own schema via PR to the GitHub repository.
148
177
</ >
149
178
) ;
150
179
}
You can’t perform that action at this time.
0 commit comments