Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@
"Bash(./gradlew:*)",
"Bash(docker-compose up:*)",
"Bash(docker-compose:*)",
"Bash(docker logs:*)"
"Bash(docker logs:*)",
"mcp__serena__get_current_config",
"mcp__serena__check_onboarding_performed",
"mcp__serena__onboarding",
"mcp__serena__list_dir",
"mcp__serena__find_file",
"mcp__serena__write_memory",
"mcp__serena__think_about_whether_you_are_done",
"mcp__serena__search_for_pattern",
"Bash(cat:*)"
],
"deny": [],
"ask": []
}
}
}
5 changes: 5 additions & 0 deletions .github/linters/.redocly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apis:
main:
root: api-spec/root.json
rules:
no-unresolved-refs: off
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ jobs:
filters: |
backend:
- 'backend/**'
- 'api-spec/**'
- '.github/workflows/**'
frontend:
- 'frontend/**'
- 'api-spec/**'
- '.github/workflows/**'

backend_lint:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.serena
# Serena memory files (local AI assistant context)
.serena/
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"linking": {
"type": "boolean",
"example": "true"
"example": true
}
},
"required": [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"properties": {
"status": {
"type": "integer",
"const": 400
"enum": [400]
},
"description": {
"type": "string",
"const": "BadRequest"
"enum": ["BadRequest"]
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"properties": {
"status": {
"type": "integer",
"const": 401
"enum": [401]
},
"description": {
"type": "string",
"const": "Unauthorized"
"enum": ["Unauthorized"]
}
},
"required": [
Expand Down
25 changes: 25 additions & 0 deletions api-spec/model/error/error403.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"allOf": [
{
"$ref": "./errorBase.json"
}
],
"type": "object",
"properties": {
"status": {
"type": "integer",
"enum": [403]
},
"description": {
"type": "string",
"enum": ["Forbidden"]
},
"cause": {
"$ref": "./error403Cause.json"
}
},
"required": [
"status",
"description"
]
}
16 changes: 16 additions & 0 deletions api-spec/model/error/error403Cause.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"CsrfTokenRequired",
"CsrfHeaderRequired",
"InvalidOrigin"
]
}
},
"required": [
"kind"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"properties": {
"status": {
"type": "integer",
"const": 404
"enum": [404]
},
"description": {
"type": "string",
"const": "NotFound"
"enum": ["NotFound"]
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"properties": {
"status": {
"type": "integer",
"const": 409
"enum": [409]
},
"description": {
"type": "string",
"const": "Conflict"
"enum": ["Conflict"]
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"status": {
"type": "integer",
"minimum": 400,
"exclusiveMaximum": 600,
"maximum": 599,
"example": 401
},
"description": {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"description": "unauthorized or not signed in"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"description": "unauthorized or not signed in"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Comments"
"$ref": "../../../../model/comments.json"
}
}
}
Expand All @@ -42,7 +42,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "path/entries/_serialNumber/comments/commentsPostRequest.json"
"$ref": "./commentsPostRequest.json"
}
}
}
Expand All @@ -53,7 +53,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Comment"
"$ref": "../../../../model/comment.json"
}
}
}
Expand All @@ -65,6 +65,7 @@
"description": "unauthorized to create a new comment"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
Expand All @@ -38,6 +39,7 @@
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
Expand All @@ -47,6 +49,7 @@
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"$ref": "../../model/error/error403.json"
"schema": {
"$ref": "../../model/error/error403.json"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@
"description": "unauthorized or not signed in"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"$ref": "../../../model/error/error403.json"
"schema": {
"$ref": "../../../model/error/error403.json"
}
}
}
}
Expand All @@ -84,9 +87,12 @@
"description": "unauthorized or not signed in"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"$ref": "../../../model/error/error403.json"
"schema": {
"$ref": "../../../model/error/error403.json"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
"description": "Bad Request"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"$ref": "../../../model/error/error403.json"
"schema": {
"$ref": "../../../model/error/error403.json"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@
"description": "Bad Request. Maybe screen name is duplicated"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"$ref": "../../model/error/error403.json"
"schema": {
"$ref": "../../model/error/error403.json"
}
}
}
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ application {
// https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/kotlin-server.md
openApiGenerate {
generatorName.set("kotlin-server")
inputSpec.set("$rootDir/src/main/resources/api-spec/root.json")
inputSpec.set("$rootDir/../api-spec/root.json")
val generatedDirPath =
layout
.buildDirectory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import com.github.hmiyado.kottage.openapi.models.Error409
object ErrorFactory {
fun create400(description: String = "BadRequest") =
Error400(
status = 400,
description = description,
status = Error400.Status._400,
description = Error400.Description.BadRequest,
)

fun create403(kind: Error403Cause.Kind? = null) =
Error403(
status = 403,
description = "Forbidden",
status = Error403.Status._403,
description = Error403.Description.Forbidden,
cause =
kind?.let {
Error403Cause(
Expand All @@ -26,7 +26,7 @@ object ErrorFactory {

fun create409() =
Error409(
status = 409,
description = "Conflict",
status = Error409.Status._409,
description = Error409.Description.Conflict,
)
}
33 changes: 0 additions & 33 deletions backend/src/main/resources/api-spec/model/error/error403.json

This file was deleted.

3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ yarn-error.log*
# switch tsconfig.json by environment and replace default config
tsconfig.json
tsconfig.tsbuildinfo

# OpenAPI Generator metadata
src/repository/openapi/generated/.openapi-generator/
Loading
Loading