-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from ashwini-desai/refactoring
Introduce codegen module
- Loading branch information
Showing
58 changed files
with
135 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,49 @@ | ||
plugins { | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.61' | ||
id 'application' | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.72' apply false | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
maven { url 'https://jitpack.io' } | ||
} | ||
subprojects { | ||
apply plugin: 'org.jetbrains.kotlin.jvm' | ||
|
||
dependencies { | ||
implementation platform('org.jetbrains.kotlin:kotlin-bom') | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | ||
group = 'com.medly.apifi' | ||
|
||
implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.16' | ||
implementation 'org.openapitools:openapi-generator-cli:3.3.4' | ||
implementation 'com.squareup:kotlinpoet:1.5.0' | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
implementation 'com.github.medly:ktee:master-SNAPSHOT' | ||
dependencies { | ||
implementation platform('org.jetbrains.kotlin:kotlin-bom') | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | ||
|
||
implementation 'org.slf4j:slf4j-simple:1.7.30' | ||
implementation 'org.apache.commons:commons-text:1.8' | ||
testImplementation 'io.kotest:kotest-runner-junit5-jvm:4.1.1' | ||
testImplementation 'io.kotest:kotest-assertions-core-jvm:4.1.1' | ||
testImplementation 'io.kotest:kotest-property-jvm:4.1.1' | ||
testImplementation 'io.kotest:kotest-runner-console-jvm:4.1.1' | ||
} | ||
|
||
testImplementation 'org.jetbrains.kotlin:kotlin-test' | ||
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5' | ||
testImplementation 'io.kotlintest:kotlintest-runner-junit5:3.4.2' | ||
} | ||
test { | ||
useJUnitPlatform() | ||
test { | ||
useJUnitPlatform() | ||
|
||
testLogging { | ||
events "PASSED", "FAILED", "SKIPPED" | ||
exceptionFormat "full" | ||
testLogging { | ||
events "PASSED", "FAILED", "SKIPPED" | ||
exceptionFormat "full" | ||
} | ||
} | ||
|
||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
} | ||
application { | ||
// Define the main class for the application. | ||
mainClassName = 'apifi.AppKt' | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes 'Main-Class': "${mainClassName}" | ||
project(":codegen") { | ||
dependencies { | ||
implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.16' | ||
implementation 'org.openapitools:openapi-generator-cli:3.3.4' | ||
implementation 'com.squareup:kotlinpoet:1.5.0' | ||
|
||
implementation 'org.slf4j:slf4j-simple:1.7.30' | ||
implementation 'org.apache.commons:commons-text:1.8' | ||
} | ||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } | ||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } | ||
} |
File renamed without changes.
7 changes: 4 additions & 3 deletions
7
src/main/kotlin/apifi/codegen/ApiBuilder.kt → ...c/main/kotlin/apifi/codegen/ApiBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ain/kotlin/apifi/codegen/CodeGenerator.kt → ...ain/kotlin/apifi/codegen/CodeGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ifi/codegen/ControllerInterfaceBuilder.kt → ...ifi/codegen/ControllerInterfaceBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ain/kotlin/apifi/codegen/HeaderBuilder.kt → ...ain/kotlin/apifi/codegen/HeaderBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../kotlin/apifi/codegen/ModelFileBuilder.kt → .../kotlin/apifi/codegen/ModelFileBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tlin/apifi/codegen/PathVariableBuilder.kt → ...tlin/apifi/codegen/PathVariableBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...kotlin/apifi/codegen/QueryParamBuilder.kt → ...kotlin/apifi/codegen/QueryParamBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
...lin/apifi/codegen/ExceptionFileBuilder.kt → ...odegen/exceptions/ExceptionFileBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...in/apifi/codegen/Non200ResponseHandler.kt → ...degen/exceptions/Non200ResponseHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/apifi/parser/models/Model.kt → ...gen/src/main/kotlin/apifi/models/Model.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package apifi.parser.models | ||
package apifi.models | ||
|
||
data class Model( | ||
val name: String, | ||
|
3 changes: 1 addition & 2 deletions
3
src/main/kotlin/apifi/parser/models/Spec.kt → codegen/src/main/kotlin/apifi/models/Spec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...kotlin/apifi/parser/ResponseBodyParser.kt → ...kotlin/apifi/parser/ResponseBodyParser.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ain/kotlin/apifi/parser/SpecFileParser.kt → ...ain/kotlin/apifi/parser/SpecFileParser.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions
12
...st/kotlin/apifi/codegen/ApiBuilderTest.kt → ...st/kotlin/apifi/codegen/ApiBuilderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...kotlin/apifi/codegen/CodeGeneratorTest.kt → ...kotlin/apifi/codegen/CodeGeneratorTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...codegen/ControllerInterfaceBuilderTest.kt → ...codegen/ControllerInterfaceBuilderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
...apifi/codegen/ExceptionFileBuilderTest.kt → ...apifi/codegen/ExceptionFileBuilderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...kotlin/apifi/codegen/HeaderBuilderTest.kt → ...kotlin/apifi/codegen/HeaderBuilderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
...lin/apifi/codegen/ModelFileBuilderTest.kt → ...lin/apifi/codegen/ModelFileBuilderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...pifi/codegen/Non200ResponseHandlerTest.kt → ...pifi/codegen/Non200ResponseHandlerTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
.../apifi/codegen/PathVariableBuilderTest.kt → .../apifi/codegen/PathVariableBuilderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.