Skip to content

Commit

Permalink
Metrics and language support methods (#22)
Browse files Browse the repository at this point in the history
* add Metrics.GetMetrics

* add spell.Dictionaries/SupportedLanguages()
  • Loading branch information
hugowetterberg authored Dec 3, 2024
1 parent a170171 commit c718481
Show file tree
Hide file tree
Showing 9 changed files with 2,097 additions and 932 deletions.
2 changes: 1 addition & 1 deletion docs/index-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@
},
"info": {
"title": "index API",
"version": "v0.17.4"
"version": "v0.17.5"
},
"openapi": "3.0.0",
"paths": {
Expand Down
81 changes: 79 additions & 2 deletions docs/repository-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,31 @@
},
"type": "object"
},
"elephant.repository.GetMetricsRequest": {
"properties": {
"kind": {
"type": "string"
},
"label": {
"type": "string"
},
"uuid": {
"type": "string"
}
},
"type": "object"
},
"elephant.repository.GetMetricsResponse": {
"properties": {
"metrics": {
"items": {
"$ref": "#/components/schemas/elephant.repository.Metric"
},
"type": "array"
}
},
"type": "object"
},
"elephant.repository.GetPermissionsRequest": {
"properties": {
"uuid": {
Expand Down Expand Up @@ -936,6 +961,20 @@
},
"type": "object"
},
"elephant.repository.Metric": {
"properties": {
"kind": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "integer"
}
},
"type": "object"
},
"elephant.repository.MetricAggregation": {
"enum": [
"NONE",
Expand Down Expand Up @@ -1695,7 +1734,7 @@
},
"info": {
"title": "repository API",
"version": "v0.17.4"
"version": "v0.17.5"
},
"openapi": "3.0.0",
"paths": {
Expand Down Expand Up @@ -2081,7 +2120,7 @@
},
"/twirp/elephant.repository.Documents/GetStatus": {
"post": {
"description": "GetStatus returns a single status.",
"description": "GetStatus returns a single status for a document.",
"requestBody": {
"content": {
"application/json": {
Expand Down Expand Up @@ -2535,6 +2574,44 @@
]
}
},
"/twirp/elephant.repository.Metrics/GetMetrics": {
"post": {
"description": "GetMetrics returns metrics related to a document.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/elephant.repository.GetMetricsRequest"
}
}
}
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/elephant.repository.GetMetricsResponse"
}
}
},
"description": "Method response"
},
"default": {
"description": ""
}
},
"security": [
{
"bearer": []
}
],
"summary": "GetMetrics",
"tags": [
"Metrics"
]
}
},
"/twirp/elephant.repository.Metrics/RegisterKind": {
"post": {
"description": "Register a metric kind",
Expand Down
64 changes: 63 additions & 1 deletion docs/spell-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
},
"type": "object"
},
"elephant.spell.Language": {
"properties": {
"code": {
"description": "Code for the language.",
"type": "string"
}
},
"type": "object"
},
"elephant.spell.ListDictionariesRequest": {
"type": "object"
},
Expand Down Expand Up @@ -174,6 +183,21 @@
},
"type": "object"
},
"elephant.spell.SupportedLanguagesRequest": {
"type": "object"
},
"elephant.spell.SupportedLanguagesResponse": {
"properties": {
"languages": {
"description": "Languages that can be used for spellchecking.",
"items": {
"$ref": "#/components/schemas/elephant.spell.Language"
},
"type": "array"
}
},
"type": "object"
},
"elephant.spell.TextRequest": {
"properties": {
"language": {
Expand Down Expand Up @@ -212,7 +236,7 @@
},
"info": {
"title": "spell API",
"version": "v0.17.4"
"version": "v0.17.5"
},
"openapi": "3.0.0",
"paths": {
Expand Down Expand Up @@ -443,6 +467,44 @@
"Dictionaries"
]
}
},
"/twirp/elephant.spell.Dictionaries/SupportedLanguages": {
"post": {
"description": "SupportedLanguages returns a list of supported languages.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/elephant.spell.SupportedLanguagesRequest"
}
}
}
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/elephant.spell.SupportedLanguagesResponse"
}
}
},
"description": "Method response"
},
"default": {
"description": ""
}
},
"security": [
{
"bearer": []
}
],
"summary": "SupportedLanguages",
"tags": [
"Dictionaries"
]
}
}
},
"servers": [
Expand Down
Loading

0 comments on commit c718481

Please sign in to comment.