Skip to content

Commit 461730a

Browse files
committed
renamed project
1 parent 12f4b2e commit 461730a

28 files changed

Lines changed: 91 additions & 91 deletions

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# contributing to openapi-generatr
1+
# contributing to openapi-processor
22

33
## feature & bug reports
44

@@ -22,7 +22,7 @@ should create. The structure looks like this:
2222

2323
The `mapping.yaml` contains the type mapping information and is an optional file.
2424

25-
See the [existing integration tests][generatr-int-resources] for a couple of examples.
25+
See the [existing integration tests][oap-int-resources] for a couple of examples.
2626

2727
## working on the code
2828

@@ -32,7 +32,7 @@ the minimum jdk is currently JDK 8
3232

3333
### ide setup
3434

35-
openapi-generatr can be imported into IntelliJ IDEA by opening the `build.gradle` file.
35+
openapi-processor can be imported into IntelliJ IDEA by opening the `build.gradle` file.
3636

3737
### running the tests
3838

@@ -44,3 +44,4 @@ To run the tests use `./gradlew check`.
4444

4545
The documentation is in `docs`. See the `README` in `docs` for setup and viewing it locally.
4646

47+
[oap-int-resources]: https://github.com/hauner/openapi-processor-spring/tree/master/src/testInt/resources

README.md

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

4-
# openapi-generatr-spring
4+
![openapi-processor-spring logo](images/openapi-processor-spring@1280x200.png)
5+
6+
# openapi-processor-spring
57

68
a simple [OpenAPI][openapi] interface only code generator for [Spring Boot][springboot].
79

810

911
# Getting Started
1012

11-
See the [documentation][generatr-doc].
13+
See the [documentation][oap-doc].
1214

1315

1416
# Sample
1517

16-
See [`openapi-generatr-spring-mvc-sample`][generatr-sample] for a complete working sample of a minimal
18+
See [`openapi-processor-spring-mvc-sample`][oap-sample] for a complete working sample of a minimal
1719
openapi.yaml.
1820

1921
# Features & Bugs
2022

21-
In case some feature is missing or the generated code is not 100% what you would expect create an issue
22-
with test case. Providing a test case will help significantly :-)
23+
In case some feature is missing or the generated code is not 100% what you would expect create an
24+
issue with test case. Providing a test case will help significantly :-)
2325

24-
A test case is a single folder with an openapi.yaml file and the expected Java files the generatr should create.
25-
The structure looks like this:
26+
A test case is a single folder with an openapi.yaml file and the expected Java files the processor
27+
should create. The structure looks like this:
2628

2729
my-new-test-case/
2830
openapi.yaml
@@ -38,12 +40,12 @@ The structure looks like this:
3840

3941
The `mapping.yaml` contains the type mapping information.
4042

41-
See the [existing integration tests][generatr-int-resources] for a couple of examples.
43+
See the [existing integration tests][oap-int-resources] for a couple of examples.
4244

4345
[badge-license]: https://img.shields.io/badge/License-Apache%202.0-blue.svg?labelColor=313A42
4446
[badge-ci]: https://github.com/hauner/openapi-generatr-spring/workflows/ci/badge.svg
4547

46-
[workflow-ci]: https://github.com/hauner/openapi-generatr-spring/actions?query=workflow%3Aci
48+
[workflow-ci]: https://github.com/hauner/openapi-processor-spring/actions?query=workflow%3Aci
4749

4850
[openapi]: https://www.openapis.org/
4951
[openapi-spec]: https://github.com/OAI/OpenAPI-Specification
@@ -54,8 +56,8 @@ See the [existing integration tests][generatr-int-resources] for a couple of exa
5456
[spring-requestparam]: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestParam.html
5557
[spring-responseentity]: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/ResponseEntity.html
5658

57-
[generatr-license]: https://github.com/hauner/openapi-generatr-spring/blob/master/LICENSE
58-
[generatr-doc]: https://hauner.github.io/openapi-generatr-spring/
59-
[generatr-int-resources]: https://github.com/hauner/openapi-generatr-spring/tree/master/src/testInt/resources
60-
[generatr-gradle]: https://github.com/hauner/openapi-generatr-gradle
61-
[generatr-sample]: https://github.com/hauner/openapi-generatr-spring-mvc-sample
59+
[oap-license]: https://github.com/hauner/openapi-generatr-spring/blob/master/LICENSE
60+
[oap-doc]: https://hauner.github.io/openapi-processor-spring/
61+
[oap-int-resources]: https://github.com/hauner/openapi-processor-spring/tree/master/src/testInt/resources
62+
[oap-gradle]: https://github.com/hauner/openapi-processor-gradle
63+
[oap-sample]: https://github.com/hauner/openapi-generatr-spring-mvc-sample

build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sourceCompatibility = JavaVersion.VERSION_1_8
1616
targetCompatibility = JavaVersion.VERSION_1_8
1717

1818
ext {
19-
generatrApiVersion = '1.0.0.M3'
19+
processorApiVersion = '1.0.0.M4'
2020

2121
bintrayUser = project.hasProperty ('BINTRAY_USER') ? BINTRAY_USER : 'n/a'
2222
bintrayKey = project.hasProperty ('BINTRAY_KEY') ? BINTRAY_KEY : 'n/a'
@@ -30,7 +30,7 @@ repositories {
3030
url "https://oss.sonatype.org/content/repositories/snapshots"
3131
}
3232
maven {
33-
url "https://dl.bintray.com/hauner/openapi-generatr"
33+
url "https://dl.bintray.com/hauner/openapi-processor"
3434
}
3535
}
3636

@@ -49,7 +49,7 @@ dependencies {
4949
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
5050
implementation 'io.swagger.parser.v3:swagger-parser:2.0.17'
5151
implementation 'com.google.googlejavaformat:google-java-format:1.7'
52-
compileOnly "com.github.hauner.openapi:openapi-generatr-api:$generatrApiVersion"
52+
compileOnly "com.github.hauner.openapi:openapi-processor-api:$processorApiVersion"
5353

5454
testImplementation ('org.spockframework:spock-core:2.0-M2-groovy-3.0') {
5555
exclude group: 'org.codehaus.groovy'
@@ -60,7 +60,7 @@ dependencies {
6060
testImplementation 'net.bytebuddy:byte-buddy:1.10.7'
6161
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
6262

63-
testIntImplementation "com.github.hauner.openapi:openapi-generatr-api:$generatrApiVersion"
63+
testIntImplementation "com.github.hauner.openapi:openapi-processor-api:$processorApiVersion"
6464
testIntImplementation 'io.github.java-diff-utils:java-diff-utils:4.5'
6565
// testIntRuntimeOnly 'org.slf4j:slf4j-simple:1.7.30'
6666
// testIntRuntimeOnly 'org.slf4j:slf4j-nop:1.6.1'
@@ -93,14 +93,14 @@ dokka {
9393
bintray {
9494
user = bintrayUser
9595
key = bintrayKey
96-
publications = ['GeneratrSpring']
96+
publications = ['processor']
9797

9898
pkg {
99-
repo = 'openapi-generatr'
100-
name = 'openapi-generatr-spring'
99+
repo = 'openapi-processor'
100+
name = 'openapi-processor-spring'
101101
//userOrg = 'openapi-generatr'
102102
licenses = ['Apache-2.0']
103-
vcsUrl = 'https://github.com/hauner/openapi-generatr-spring'
103+
vcsUrl = 'https://github.com/hauner/openapi-processor-spring'
104104

105105
version {
106106
name = project.version
@@ -110,7 +110,7 @@ bintray {
110110

111111
publishing {
112112
publications {
113-
GeneratrSpring (MavenPublication) {
113+
processor (MavenPublication) {
114114
from components.java
115115
artifact sourcesJar
116116
artifact javadocJar
12.2 KB
Loading
24.5 KB
Loading

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name = 'openapi-generatr-spring'
1+
rootProject.name = 'openapi-processor-spring'

src/main/groovy/com/github/hauner/openapi/spring/generatr/MappingConverter.groovy renamed to src/main/groovy/com/github/hauner/openapi/spring/processor/MappingConverter.groovy

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

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

1919
import com.github.hauner.openapi.spring.converter.mapping.AddParameterTypeMapping
2020
import com.github.hauner.openapi.spring.converter.mapping.EndpointTypeMapping
2121
import com.github.hauner.openapi.spring.converter.mapping.Mapping
2222
import com.github.hauner.openapi.spring.converter.mapping.ParameterTypeMapping
2323
import com.github.hauner.openapi.spring.converter.mapping.ResponseTypeMapping
2424
import com.github.hauner.openapi.spring.converter.mapping.TypeMapping
25-
import com.github.hauner.openapi.spring.generatr.mapping.AdditionalParameter
26-
import com.github.hauner.openapi.spring.generatr.mapping.Mapping as YamlMapping
27-
import com.github.hauner.openapi.spring.generatr.mapping.Parameter
28-
import com.github.hauner.openapi.spring.generatr.mapping.Path
29-
import com.github.hauner.openapi.spring.generatr.mapping.RequestParameter
30-
import com.github.hauner.openapi.spring.generatr.mapping.Response
31-
import com.github.hauner.openapi.spring.generatr.mapping.Type
25+
import com.github.hauner.openapi.spring.processor.mapping.AdditionalParameter
26+
import com.github.hauner.openapi.spring.processor.mapping.Mapping as YamlMapping
27+
import com.github.hauner.openapi.spring.processor.mapping.Parameter
28+
import com.github.hauner.openapi.spring.processor.mapping.Path
29+
import com.github.hauner.openapi.spring.processor.mapping.RequestParameter
30+
import com.github.hauner.openapi.spring.processor.mapping.Response
31+
import com.github.hauner.openapi.spring.processor.mapping.Type
3232

3333
import java.util.regex.Matcher
3434
import java.util.regex.Pattern

src/main/groovy/com/github/hauner/openapi/spring/generatr/MappingReader.groovy renamed to src/main/groovy/com/github/hauner/openapi/spring/processor/MappingReader.groovy

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

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

1919
import com.fasterxml.jackson.databind.DeserializationFeature
2020
import com.fasterxml.jackson.databind.ObjectMapper
2121
import com.fasterxml.jackson.databind.PropertyNamingStrategy
2222
import com.fasterxml.jackson.databind.module.SimpleModule
2323
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
24-
import com.github.hauner.openapi.spring.generatr.mapping.Mapping
25-
import com.github.hauner.openapi.spring.generatr.mapping.Parameter
26-
import com.github.hauner.openapi.spring.generatr.mapping.ParameterDeserializer
24+
import com.github.hauner.openapi.spring.processor.mapping.Mapping
25+
import com.github.hauner.openapi.spring.processor.mapping.Parameter
26+
import com.github.hauner.openapi.spring.processor.mapping.ParameterDeserializer
2727

2828
import java.util.regex.Pattern
2929

src/main/groovy/com/github/hauner/openapi/spring/generatr/SpringGeneratr.groovy renamed to src/main/groovy/com/github/hauner/openapi/spring/processor/SpringProcessor.groovy

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

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

19-
import com.github.hauner.openapi.api.OpenApiGeneratr
19+
import com.github.hauner.openapi.api.OpenApiProcessor
2020
import com.github.hauner.openapi.spring.converter.ApiConverter
2121
import com.github.hauner.openapi.spring.converter.ApiOptions
2222
import com.github.hauner.openapi.spring.writer.ApiWriter
@@ -31,34 +31,34 @@ import io.swagger.v3.parser.core.models.ParseOptions
3131
import io.swagger.v3.parser.core.models.SwaggerParseResult
3232

3333
/**
34-
* Entry point of openapi-generatr-spring.
34+
* Entry point of openapi-processor-spring.
3535
*
3636
* @author Martin Hauner
3737
* @author Bastian Wilhelm
3838
*/
39-
class SpringGeneratr implements OpenApiGeneratr {
39+
class SpringProcessor implements OpenApiProcessor {
4040

4141
@Override
4242
String getName () {
4343
return 'spring'
4444
}
4545

4646
@Override
47-
void run (Map<String, ?> generatrOptions) {
47+
void run (Map<String, ?> processorOptions) {
4848
ParseOptions opts = new ParseOptions(
4949
// loads $refs to other files into #/components/schema and replaces the $refs to the
5050
// external files with $refs to #/components/schema.
5151
resolve: true
5252
)
5353

5454
SwaggerParseResult result = new OpenAPIV3Parser ()
55-
.readLocation (generatrOptions.apiPath as String, null, opts)
55+
.readLocation (processorOptions.apiPath as String, null, opts)
5656

57-
if (generatrOptions.showWarnings) {
57+
if (processorOptions.showWarnings) {
5858
printWarnings(result.messages)
5959
}
6060

61-
def options = convertOptions (generatrOptions)
61+
def options = convertOptions (processorOptions)
6262
def cv = new ApiConverter(options)
6363
def api = cv.convert (result.openAPI)
6464

@@ -86,30 +86,30 @@ class SpringGeneratr implements OpenApiGeneratr {
8686
writer.write (api)
8787
}
8888

89-
private ApiOptions convertOptions (Map<String, ?> generatrOptions) {
89+
private ApiOptions convertOptions (Map<String, ?> processorOptions) {
9090
def reader = new MappingReader ()
9191
def converter = new MappingConverter ()
9292
def mapping
9393

94-
if (generatrOptions.containsKey ('mapping')) {
95-
mapping = reader.read (generatrOptions.mapping as String)
94+
if (processorOptions.containsKey ('mapping')) {
95+
mapping = reader.read (processorOptions.mapping as String)
9696

97-
} else if (generatrOptions.containsKey ('typeMappings')) {
98-
mapping = reader.read (generatrOptions.typeMappings as String)
97+
} else if (processorOptions.containsKey ('typeMappings')) {
98+
mapping = reader.read (processorOptions.typeMappings as String)
9999
println "warning: 'typeMappings' option is deprecated, use 'mapping'!"
100100
}
101101

102102
def options = new ApiOptions ()
103-
options.apiPath = generatrOptions.apiPath
104-
options.targetDir = generatrOptions.targetDir
103+
options.apiPath = processorOptions.apiPath
104+
options.targetDir = processorOptions.targetDir
105105

106-
if (generatrOptions.packageName) {
107-
options.packageName = generatrOptions.packageName
106+
if (processorOptions.packageName) {
107+
options.packageName = processorOptions.packageName
108108
println "warning: 'options:package-name' should be set in the mapping yaml!"
109109
}
110110

111-
if (generatrOptions.containsKey ('beanValidation')) {
112-
options.beanValidation = generatrOptions.beanValidation
111+
if (processorOptions.containsKey ('beanValidation')) {
112+
options.beanValidation = processorOptions.beanValidation
113113
println "warning: 'options:bean-validation' should be set in the mapping yaml!"
114114
}
115115

src/main/groovy/com/github/hauner/openapi/spring/generatr/mapping/AdditionalParameter.groovy renamed to src/main/groovy/com/github/hauner/openapi/spring/processor/mapping/AdditionalParameter.groovy

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.github.hauner.openapi.spring.generatr.mapping
18-
19-
import com.fasterxml.jackson.annotation.JsonProperty
20-
17+
package com.github.hauner.openapi.spring.processor.mapping
2118
/**
2219
* a "parameters:" add parameter entry in the mapping yaml
2320
*

0 commit comments

Comments
 (0)