Skip to content

Commit

Permalink
feat: update DC api and readme (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ram-20062003 authored Dec 30, 2022
1 parent 9cd40cc commit 475fb37
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<h1 align="center">CodeCharacter Server 2023</h1>

<p align="center">
<a href="https://github.com/delta/codecharacter-server-2022/actions/workflows/ci.yml">
<img src="https://github.com/delta/codecharacter-server-2022/actions/workflows/ci.yml/badge.svg"/>
<a href="https://github.com/delta/codecharacter-server-2023/actions/workflows/ci.yml">
<img src="https://github.com/delta/codecharacter-server-2023/actions/workflows/ci.yml/badge.svg"/>
</a>
<a href="https://github.com/delta/codecharacter-server-2022/actions/workflows/docs.yml">
<img src="https://github.com/delta/codecharacter-server-2022/actions/workflows/docs.yml/badge.svg"/>
<a href="https://github.com/delta/codecharacter-server-2023/actions/workflows/docs.yml">
<img src="https://github.com/delta/codecharacter-server-2023/actions/workflows/docs.yml/badge.svg"/>
</a>
<a href="https://codecov.io/gh/delta/codecharacter-server-2022">
<img src="https://codecov.io/gh/delta/codecharacter-server-2022/branch/main/graph/badge.svg?token=DW315MJFHY"/>
<a href="https://codecov.io/gh/delta/codecharacter-server-2023">
<img src="https://codecov.io/gh/delta/codecharacter-server-2023/branch/main/graph/badge.svg"/>
</a>
</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CodeCharacter Server 2022
# CodeCharacter Server 2023

### Code Generation Process

Expand Down
9 changes: 8 additions & 1 deletion docs/spec/CodeCharacter-API.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: CodeCharacter API
version: 2022.0.1
version: 2023.0.1
contact:
name: CodeCharacter Authors
url: 'https://delta.nitt.edu'
Expand Down Expand Up @@ -1808,11 +1808,18 @@ components:
challName:
type: string
example: Daily Challenge 1
description:
type: string
example: Daily Challenge description
chall:
type: string
example: 'print("hello world");'
challType:
$ref: '#/components/schemas/ChallengeType'
completionStatus:
type: boolean
example: true

required:
- challName
- chall
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/generator-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiPackage: delta.codecharacter.core
artifactId: codecharacter-core
artifactVersion: 2022.0.1
artifactVersion: 2023.0.1
basePackage: delta.codecharacter
delegatePattern: false
enumPropertyNaming: UPPERCASE
Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

group = "delta.codecharacter"
version = "2022.0.1"
version = "2023.0.1"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SpringDocConfiguration {
License()
.name("MIT")
)
.version("2022.0.1")
.version("2023.0.1")
)
.components(
Components()
Expand Down
7 changes: 7 additions & 0 deletions library/src/main/kotlin/delta/codecharacter/core/CodeApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ import io.swagger.v3.oas.annotations.media.*
import io.swagger.v3.oas.annotations.responses.*
import io.swagger.v3.oas.annotations.security.*
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springframework.http.ResponseEntity

import org.springframework.web.bind.annotation.*
import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
Expand All @@ -28,7 +33,9 @@ import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map

@Validated
@RequestMapping("\${api.base-path:}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import io.swagger.v3.oas.annotations.media.Schema
* @param challName
* @param chall
* @param challType
* @param description
* @param completionStatus
*/
data class DailyChallengeGetRequestDto(

Expand All @@ -30,7 +32,13 @@ data class DailyChallengeGetRequestDto(

@field:Valid
@Schema(example = "null", required = true, description = "")
@field:JsonProperty("challType", required = true) val challType: ChallengeTypeDto
@field:JsonProperty("challType", required = true) val challType: ChallengeTypeDto,

@Schema(example = "Daily Challenge description", description = "")
@field:JsonProperty("description") val description: kotlin.String? = null,

@Schema(example = "true", description = "")
@field:JsonProperty("completionStatus") val completionStatus: kotlin.Boolean? = null
) {

}
Expand Down

0 comments on commit 475fb37

Please sign in to comment.