Codevault initial commit

This commit is contained in:
2026-08-16 16:23:14 +03:00
commit 6ee80f1c8f
47 changed files with 3177 additions and 0 deletions

73
internal/api/openapi.yaml Normal file
View File

@@ -0,0 +1,73 @@
openapi: 3.0.3
info:
title: CodeVault API
version: "1.0.0"
paths:
/api/v1/getValue:
post:
operationId: getValue
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GetValueRequest'
responses:
'200':
description: Value found
content:
application/json:
schema:
$ref: '#/components/schemas/GetValueResponse'
'400':
description: Invalid request body
'404':
description: Value not found
/api/v1/setValue:
post:
operationId: setValue
security:
- basicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SetValueRequest'
responses:
'204':
description: Value stored
'400':
description: Invalid request body
'401':
description: Missing or invalid credentials
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
schemas:
GetValueRequest:
type: object
required:
- code
properties:
code:
type: string
GetValueResponse:
type: object
required:
- value
properties:
value:
type: string
SetValueRequest:
type: object
required:
- code
- value
properties:
code:
type: string
value:
type: string