Skip to content

Commit 32932cf

Browse files
committed
renamed project
1 parent e355f5e commit 32932cf

File tree

9 files changed

+46
-56
lines changed

9 files changed

+46
-56
lines changed

README.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,51 @@
1-
[![][badge-license]][generatr-license]
1+
[![][badge-license]][oap-license]
22
[![][badge-ci]][workflow-ci]
33

4-
# openapi-generatr-json
4+
![openapi-processor-api logo](images/openapi-processor-json@1280x200.png)
55

6-
a simple [OpenAPI][openapi] yaml to json generatr.
7-
86

9-
# Getting Started
7+
# openapi-processor-json
108

11-
The openapi generatr [gradle plugin][generatr-gradle] is the easiest way to use yaml to json generatr.
9+
a simple [OpenAPI][openapi] yaml to json converter.
10+
1211

13-
## adding generatr-json
12+
# Getting Started
1413

15-
The plugin provides a `openapiGeneratr` dependency configuration that is used to add the generatr dependency.
14+
The openapi processor [gradle plugin][opa-gradle] is the easiest way to use the yaml to json processor.
1615

17-
dependencies {
18-
// 'openapiGeneratr' is a custom configuration that is used by the gradle plugin.
19-
openapiGeneratr 'com.github.hauner.openapi:openapi-generatr-json:1.0.0.M1'
20-
21-
// ....
22-
// normal project dependencies
23-
// ....
24-
}
25-
26-
## configuring generatr-json
16+
## configuring openapi-processor-json
2717

28-
The plugin will add an `openapiGeneratr` configuration block that is used to configure the generatrs.
29-
Configuration for a specific generatr is placed inside it using the generatr name as configuration
30-
block name.
18+
The plugin will add an `openapiGeneratr` configuration block that is used to configure the openapi processors.
19+
Configuration for a specific processor is placed inside it using the processor name (in this case `json`) as
20+
configuration block name.
3121

32-
openapiGeneratr {
22+
openapiProcessor {
3323

3424
json {
25+
processor 'com.github.hauner.openapi:openapi-processor-json:1.0.0.Mx'
26+
3527
apiPath = "$projectDir/src/api/openapi.yaml"
3628
targetDir = "$projectDir/build/openapi"
3729
}
3830

3931
}
4032
41-
- `apiPath`: (**required**) the path to the `openapi.yaml` file and the main input for the generatr.
33+
- `apiPath`: (**required**) the path to the `openapi.yaml` file and the main input for the processor.
4234

4335
- `targetDir`: (**required**) the output folder for generating the `openapi.json` file.
4436

4537
# Sample
4638

47-
See [`openapi-generatr-spring-mvc-sample`][generatr-sample] for a complete working sample of a minimal
48-
openapi.yaml.
39+
See [`openapi-processor-spring-mvc-sample`][oap-sample] for a complete working sample of a minimal openapi.yaml.
4940

5041

5142
[badge-license]: https://img.shields.io/badge/License-Apache%202.0-blue.svg?labelColor=313A42
52-
[badge-ci]: https://github.com/hauner/openapi-generatr-json/workflows/ci/badge.svg
43+
[badge-ci]: https://github.com/hauner/openapi-processor-json/workflows/ci/badge.svg
5344

54-
[workflow-ci]: https://github.com/hauner/openapi-generatr-json/actions?query=workflow%3Aci
45+
[workflow-ci]: https://github.com/hauner/openapi-processor-json/actions?query=workflow%3Aci
5546

5647
[openapi]: https://www.openapis.org/
5748

58-
[generatr-license]: https://github.com/hauner/openapi-generatr-json/blob/master/LICENSE
59-
[generatr-gradle]: https://github.com/hauner/openapi-generatr-gradle
60-
[generatr-sample]: https://github.com/hauner/openapi-generatr-spring-mvc-sample
49+
[oap-license]: https://github.com/hauner/openapi-processor-json/blob/master/LICENSE
50+
[oap-gradle]: https://github.com/hauner/openapi-processor-gradle
51+
[oap-sample]: https://github.com/hauner/openapi-generatr-spring-mvc-sample

build.gradle.kts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ plugins {
66
}
77

88
group = "com.github.hauner.openapi"
9-
version = "1.0.0.M2"
9+
version = "1.0.0.M3"
1010

1111
repositories {
1212
mavenCentral()
1313
maven {
14-
setUrl("https://dl.bintray.com/hauner/openapi-generatr")
14+
setUrl("https://dl.bintray.com/hauner/openapi-processor")
1515
}
1616
}
1717

1818
project.ext {
19-
set("generatrApiVersion", "1.0.0.M3")
19+
set("generatrApiVersion", "1.0.0.M4")
2020

2121
set("bintrayUser", project.findProperty("BINTRAY_USER") ?: "n/a")
2222
set("bintrayKey", project.findProperty("BINTRAY_KEY") ?: "n/a")
@@ -27,12 +27,12 @@ dependencies {
2727
implementation(kotlin("stdlib"))
2828

2929
implementation("io.swagger.parser.v3:swagger-parser:2.0.12")
30-
compileOnly("com.github.hauner.openapi:openapi-generatr-api:${project.ext.get("generatrApiVersion")}")
30+
compileOnly("com.github.hauner.openapi:openapi-processor-api:${project.ext.get("generatrApiVersion")}")
3131

3232
testImplementation("net.bytebuddy:byte-buddy:1.9.13")
3333
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5")
3434
testImplementation("io.github.java-diff-utils:java-diff-utils:4.0")
35-
testImplementation("com.github.hauner.openapi:openapi-generatr-api:${project.ext.get("generatrApiVersion")}")
35+
testImplementation("com.github.hauner.openapi:openapi-processor-api:${project.ext.get("generatrApiVersion")}")
3636
}
3737

3838
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
@@ -64,14 +64,14 @@ bintray {
6464
user = project.ext.get("bintrayUser").toString()
6565
key = project.ext.get("bintrayKey").toString()
6666

67-
setPublications("GeneratrJson")
67+
setPublications("processor")
6868

6969
pkg.apply {
70-
repo = "openapi-generatr"
71-
name = "openapi-generatr-json"
70+
repo = "openapi-processor"
71+
name = "openapi-processor-json"
7272
//userOrg = 'openapi-generatr'
7373
setLicenses("Apache-2.0")
74-
vcsUrl = "https://github.com/hauner/openapi-generatr-json"
74+
vcsUrl = "https://github.com/hauner/openapi-processor-json"
7575

7676
version.apply {
7777
name = project.version.toString()
@@ -81,7 +81,7 @@ bintray {
8181

8282
publishing {
8383
publications {
84-
create<MavenPublication>("GeneratrJson") {
84+
create<MavenPublication>("processor") {
8585
from(components["java"])
8686
artifact(sourcesJar.get())
8787
artifact(javadocJar.get())
11.2 KB
Loading
22.5 KB
Loading

settings.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
rootProject.name = "openapi-generatr-json"
2-
1+
rootProject.name = "openapi-processor-json"

src/main/kotlin/com/github/hauner/openapi/json/generatr/JsonGeneratr.kt renamed to src/main/kotlin/com/github/hauner/openapi/json/processor/JsonProcessor.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 the original authors
2+
* Copyright 2019-2020 the original authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,21 +14,21 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.github.hauner.openapi.json.generatr
17+
package com.github.hauner.openapi.json.processor
1818

19-
import com.github.hauner.openapi.api.OpenApiGeneratr
19+
import com.github.hauner.openapi.api.OpenApiProcessor
2020
import io.swagger.v3.core.util.Json
2121
import io.swagger.v3.parser.OpenAPIV3Parser
2222
import io.swagger.v3.parser.core.models.ParseOptions
2323
import io.swagger.v3.parser.core.models.SwaggerParseResult
2424
import java.io.File
2525

2626
/**
27-
* Entry point of the openapi-generatr-json.
27+
* Entry point of the openapi-processor-json.
2828
*
2929
* @author Martin Hauner
3030
*/
31-
class JsonGeneratr : OpenApiGeneratr {
31+
class JsonProcessor : OpenApiProcessor {
3232

3333
/**
3434
* provides the generatr name.
@@ -38,26 +38,26 @@ class JsonGeneratr : OpenApiGeneratr {
3838
}
3939

4040
/**
41-
* runs the generatr.
41+
* runs the processor.
4242
*
4343
* the options map should contain the following key/value pairs:
4444
*
45-
* - apiPath: (required) the path to the openapi.yaml file and the main input for the generatr.
45+
* - apiPath: (required) the path to the openapi.yaml file and the main input for the processor.
4646
* - targetDir: (required) the output folder for generating the openapi.json file.
4747
*
48-
* @param options map of generatr properties
48+
* @param options map of processor properties
4949
*/
5050
override fun run(options: MutableMap<String, *>) {
5151
val apiPath: String? = options["apiPath"]?.toString()
5252
val targetDir: String? = options["targetDir"]?.toString()
5353

5454
if (apiPath == null) {
55-
println("openapi-generatr-json: missing apiPath!")
55+
println("openapi-processor-json: missing apiPath!")
5656
return
5757
}
5858

5959
if (targetDir == null) {
60-
println("openapi-generatr-json: missing targetDir!")
60+
println("openapi-processor-json: missing targetDir!")
6161
return
6262
}
6363

src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiGeneratr

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.github.hauner.openapi.json.processor.JsonProcessor

src/test/groovy/com/github/hauner/openapi/json/generatr/JsonGeneratrSpec.groovy renamed to src/test/groovy/com/github/hauner/openapi/json/processor/JsonProcessorSpec.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.github.hauner.openapi.json.generatr
17+
package com.github.hauner.openapi.json.processor
1818

1919
import com.github.difflib.DiffUtils
2020
import com.github.difflib.UnifiedDiffUtils
2121
import org.junit.Rule
2222
import org.junit.rules.TemporaryFolder
2323
import spock.lang.Specification
2424

25-
class JsonGeneratrSpec extends Specification {
25+
class JsonProcessorSpec extends Specification {
2626

2727
@Rule
2828
public TemporaryFolder folder = new TemporaryFolder()
@@ -39,7 +39,7 @@ class JsonGeneratrSpec extends Specification {
3939
]
4040

4141
when:
42-
def generatr = new JsonGeneratr()
42+
def generatr = new JsonProcessor()
4343
generatr.run (options)
4444

4545
then:

0 commit comments

Comments
 (0)