Updated docs for notifier/service-docker-repository-query
Linked build commit: 3a00b0aa36
This commit is contained in:
1 parent
176f99dc14
commit
c1b313b226
2 files changed
+483
No files matched your search
@@ -0,0 +1,171 @@
|
|||||||
|
# docker-repository-query
|
||||||
|
|
||||||
|
Base URL: `https://notifier.gansejunge.com/internal/docker-repository-query`
|
||||||
|
|
||||||
|
### `POST /repository/add`
|
||||||
|
|
||||||
|
**Add Repository Subscription**
|
||||||
|
|
||||||
|
| Name | In | Type | Required |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `X-User-Id` | header | integer | yes |
|
||||||
|
|
||||||
|
**Request body:**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"org": "string",
|
||||||
|
"repo": "string",
|
||||||
|
"tag": "string",
|
||||||
|
"custom_name": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://notifier.gansejunge.com/internal/docker-repository-query/repository/add' \
|
||||||
|
-H 'X-API-Key: <api_key>' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{"type": "github", "org": "string", "repo": "string", "tag": "string", "custom_name": "string"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Responses:**
|
||||||
|
|
||||||
|
- `200`: Successful Response
|
||||||
|
- `422`: Validation Error
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"detail": [
|
||||||
|
{
|
||||||
|
"loc": [
|
||||||
|
"string"
|
||||||
|
],
|
||||||
|
"msg": "string",
|
||||||
|
"type": "string",
|
||||||
|
"input": null,
|
||||||
|
"ctx": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### `POST /repository/delete`
|
||||||
|
|
||||||
|
**Delete Repository Subscription**
|
||||||
|
|
||||||
|
| Name | In | Type | Required |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `X-User-Id` | header | integer | yes |
|
||||||
|
|
||||||
|
**Request body:**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"org": "string",
|
||||||
|
"repo": "string",
|
||||||
|
"tag": "string",
|
||||||
|
"custom_name": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://notifier.gansejunge.com/internal/docker-repository-query/repository/delete' \
|
||||||
|
-H 'X-API-Key: <api_key>' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{"type": "github", "org": "string", "repo": "string", "tag": "string", "custom_name": "string"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Responses:**
|
||||||
|
|
||||||
|
- `200`: Successful Response
|
||||||
|
- `422`: Validation Error
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"detail": [
|
||||||
|
{
|
||||||
|
"loc": [
|
||||||
|
"string"
|
||||||
|
],
|
||||||
|
"msg": "string",
|
||||||
|
"type": "string",
|
||||||
|
"input": null,
|
||||||
|
"ctx": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### `GET /repository/list`
|
||||||
|
|
||||||
|
**List Subscribed Repositories**
|
||||||
|
|
||||||
|
| Name | In | Type | Required |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `X-User-Id` | header | integer | yes |
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X GET 'https://notifier.gansejunge.com/internal/docker-repository-query/repository/list' \
|
||||||
|
-H 'X-API-Key: <api_key>'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Responses:**
|
||||||
|
|
||||||
|
- `200`: Successful Response
|
||||||
|
- `422`: Validation Error
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"detail": [
|
||||||
|
{
|
||||||
|
"loc": [
|
||||||
|
"string"
|
||||||
|
],
|
||||||
|
"msg": "string",
|
||||||
|
"type": "string",
|
||||||
|
"input": null,
|
||||||
|
"ctx": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### `POST /update/{repository_type}`
|
||||||
|
|
||||||
|
**Update Watched Repositories**
|
||||||
|
|
||||||
|
| Name | In | Type | Required |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `repository_type` | path | string | yes |
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://notifier.gansejunge.com/internal/docker-repository-query/update/<repository_type>' \
|
||||||
|
-H 'X-API-Key: <api_key>'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Responses:**
|
||||||
|
|
||||||
|
- `200`: Successful Response
|
||||||
|
- `422`: Validation Error
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"detail": [
|
||||||
|
{
|
||||||
|
"loc": [
|
||||||
|
"string"
|
||||||
|
],
|
||||||
|
"msg": "string",
|
||||||
|
"type": "string",
|
||||||
|
"input": null,
|
||||||
|
"ctx": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
@@ -0,0 +1,312 @@
|
|||||||
|
{
|
||||||
|
"openapi": "3.1.0",
|
||||||
|
"info": {
|
||||||
|
"title": "docker-repository-query",
|
||||||
|
"version": "0.1.0"
|
||||||
|
},
|
||||||
|
"paths": {
|
||||||
|
"/update/{repository_type}": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Update Watched Repositories",
|
||||||
|
"operationId": "update_watched_repositories_update__repository_type__post",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"HTTPBearer": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "repository_type",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RepositoryType"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful Response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Validation Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/HTTPValidationError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/repository/add": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Add Repository Subscription",
|
||||||
|
"operationId": "add_repository_subscription_repository_add_post",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"HTTPBearer": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-User-Id",
|
||||||
|
"in": "header",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"exclusiveMinimum": 0,
|
||||||
|
"title": "X-User-Id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RepositoryUpdate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful Response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Validation Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/HTTPValidationError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/repository/delete": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Delete Repository Subscription",
|
||||||
|
"operationId": "delete_repository_subscription_repository_delete_post",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"HTTPBearer": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-User-Id",
|
||||||
|
"in": "header",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"exclusiveMinimum": 0,
|
||||||
|
"title": "X-User-Id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RepositoryUpdate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful Response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Validation Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/HTTPValidationError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/repository/list": {
|
||||||
|
"get": {
|
||||||
|
"summary": "List Subscribed Repositories",
|
||||||
|
"operationId": "list_subscribed_repositories_repository_list_get",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"HTTPBearer": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-User-Id",
|
||||||
|
"in": "header",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"exclusiveMinimum": 0,
|
||||||
|
"title": "X-User-Id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful Response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Validation Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/HTTPValidationError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"schemas": {
|
||||||
|
"HTTPValidationError": {
|
||||||
|
"properties": {
|
||||||
|
"detail": {
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ValidationError"
|
||||||
|
},
|
||||||
|
"type": "array",
|
||||||
|
"title": "Detail"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object",
|
||||||
|
"title": "HTTPValidationError"
|
||||||
|
},
|
||||||
|
"RepositoryType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"github",
|
||||||
|
"dockerhub"
|
||||||
|
],
|
||||||
|
"title": "RepositoryType"
|
||||||
|
},
|
||||||
|
"RepositoryUpdate": {
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"$ref": "#/components/schemas/RepositoryType"
|
||||||
|
},
|
||||||
|
"org": {
|
||||||
|
"type": "string",
|
||||||
|
"maxLength": 39,
|
||||||
|
"title": "Org"
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"type": "string",
|
||||||
|
"maxLength": 255,
|
||||||
|
"title": "Repo"
|
||||||
|
},
|
||||||
|
"tag": {
|
||||||
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"title": "Tag"
|
||||||
|
},
|
||||||
|
"custom_name": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"maxLength": 255
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Custom Name"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"type",
|
||||||
|
"org",
|
||||||
|
"repo",
|
||||||
|
"tag"
|
||||||
|
],
|
||||||
|
"title": "RepositoryUpdate"
|
||||||
|
},
|
||||||
|
"ValidationError": {
|
||||||
|
"properties": {
|
||||||
|
"loc": {
|
||||||
|
"items": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"type": "array",
|
||||||
|
"title": "Location"
|
||||||
|
},
|
||||||
|
"msg": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Message"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Error Type"
|
||||||
|
},
|
||||||
|
"input": {
|
||||||
|
"title": "Input"
|
||||||
|
},
|
||||||
|
"ctx": {
|
||||||
|
"type": "object",
|
||||||
|
"title": "Context"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"loc",
|
||||||
|
"msg",
|
||||||
|
"type"
|
||||||
|
],
|
||||||
|
"title": "ValidationError"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"securitySchemes": {
|
||||||
|
"HTTPBearer": {
|
||||||
|
"type": "http",
|
||||||
|
"scheme": "bearer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user