Skip to content

Commit

Permalink
Adjustments to status response related to #193
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Apr 21, 2023
1 parent 1f025c2 commit 2bb1b4a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,15 +664,16 @@ Note that certain properties from the actual configuration will not be shown in
"data": "http://localhost:3000/data",
"schemes": "http://localhost:3000/voc",
"top": "http://localhost:3000/voc/top",
"concepts": "http://localhost:3000/voc/concepts",
"voc-suggest": "http://localhost:3000/voc/suggest",
"voc-search": "http://localhost:3000/voc/search",
"voc-suggest": "http://localhost:3000/voc/suggest",
"voc-concepts": "http://localhost:3000/voc/concepts",
"concepts": "http://localhost:3000/concepts",
"narrower": "http://localhost:3000/concepts/narrower",
"ancestors": "http://localhost:3000/concepts/ancestors",
"suggest": "http://localhost:3000/concepts/suggest",
"search": "http://localhost:3000/concepts/search",
"concordances": "http://localhost:3000/concordances",
"suggest": "http://localhost:3000/concepts/suggest",
"mappings": "http://localhost:3000/mappings",
"concordances": "http://localhost:3000/concordances",
"annotations": "http://localhost:3000/annotations",
"types": null,
"validate": "http://localhost:3000/validate",
Expand Down
8 changes: 5 additions & 3 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,12 @@ Object.defineProperty(config, "status", { get: function() {
"top",
"voc-search",
"voc-suggest",
"voc-concepts",
"concepts",
"narrower",
"ancestors",
"suggest",
"search",
"suggest",
"mappings",
"concordances",
"annotations",
Expand All @@ -238,14 +239,15 @@ Object.defineProperty(config, "status", { get: function() {
status.top = `${baseUrl}voc/top`
status["voc-search"] = `${baseUrl}voc/search`
status["voc-suggest"] = `${baseUrl}voc/suggest`
status["voc-concepts"] = `${baseUrl}voc/concepts`
}
if (status.config.concepts) {
// Add endpoints related to concepts
status.concepts = `${baseUrl}voc/concepts`
status.concepts = `${baseUrl}concepts`
status.narrower = `${baseUrl}concepts/narrower`
status.ancestors = `${baseUrl}concepts/ancestors`
status.suggest = `${baseUrl}concepts/suggest`
status.search = `${baseUrl}concepts/search`
status.suggest = `${baseUrl}concepts/suggest`
}
if (status.config.mappings) {
status.mappings = `${baseUrl}mappings`
Expand Down
14 changes: 9 additions & 5 deletions status.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
"description": "Server configuration object",
"$ref": "#/definitions/config"
},
"data": {
"description": "API URL for data",
"$ref": "#/definitions/uriOrNull"
},
"schemes": {
"description": "API URL for concept schemes",
"$ref": "#/definitions/uriOrNull"
Expand All @@ -80,9 +84,9 @@
"description": "API URL for top concepts",
"$ref": "#/definitions/uriOrNull"
},
"concepts": {
"description": "API URL for concepts",
"$ref": "#/definitions/uriOrNull"
"voc-concepts": {
"description": "API URL for a vocabulary's concepts",
"$ref": "#/definitions/stringOrNull"
},
"voc-suggest": {
"description": "API URL for vocabulary suggest",
Expand All @@ -92,8 +96,8 @@
"description": "API URL for vocabulary search",
"$ref": "#/definitions/stringOrNull"
},
"data": {
"description": "API URL for data",
"concepts": {
"description": "API URL for concepts",
"$ref": "#/definitions/uriOrNull"
},
"narrower": {
Expand Down

0 comments on commit 2bb1b4a

Please sign in to comment.