@team-supercharge/oasg 8.0.1 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [8.0.2](https://gitlab.com/team-supercharge/oasg/compare/v8.0.1...v8.0.2) (2023-02-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* config for inline schema naming, extend migration guide ([e589430](https://gitlab.com/team-supercharge/oasg/commit/e589430a00687c41e725fcef0285cf4af4fb61d6))
|
|
11
|
+
|
|
5
12
|
### [8.0.1](https://gitlab.com/team-supercharge/oasg/compare/v8.0.0...v8.0.1) (2023-02-23)
|
|
6
13
|
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -707,7 +707,7 @@ This section covers the breaking changes and their migrations across major versi
|
|
|
707
707
|
|
|
708
708
|
### From `7.x.x` to `8.0.0`
|
|
709
709
|
|
|
710
|
-
|
|
710
|
+
#### Linting
|
|
711
711
|
|
|
712
712
|
If you plan to use the _OASg_ base image with the preinstalled `oasg` binary without installing npm dependencies on CI, make sure you update your `.spectral.yaml` from the previously recommended syntax which picked up the rules directly from the file system:
|
|
713
713
|
|
|
@@ -721,7 +721,7 @@ to use the syntax which picks up rules from the npm package wherever it's instal
|
|
|
721
721
|
extends: '@team-supercharge/oasg/rules/default.yaml'
|
|
722
722
|
```
|
|
723
723
|
|
|
724
|
-
|
|
724
|
+
#### Spring Boot 3 support in `spring-kotlin`, `spring` and `feign`
|
|
725
725
|
|
|
726
726
|
Spring Boot 3 version is the default for these generators. To generate Spring Boot 2 libraries, add `-puseSpringBoot3=false` to `generatorCustomArgs` in the projects `config.json`
|
|
727
727
|
|
|
@@ -732,6 +732,49 @@ From **OASg 8.0.0** the recommended way is to use the base image matching OASg v
|
|
|
732
732
|
- update-java-alternatives -s temurin-11-jdk-amd64
|
|
733
733
|
```
|
|
734
734
|
|
|
735
|
+
#### Inline Schema Naming in `spring-kotlin`, `spring` and `feign`
|
|
736
|
+
|
|
737
|
+
Generating names of inline schemas works differently in the updated [openapi-generator](https://openapi-generator.tech/) version `6.3.0` which is now used in the targets above. If you used inline and/or nested schemas the generated artifact **might break** you project and you need to rename your schemas.
|
|
738
|
+
|
|
739
|
+
Take the following schema:
|
|
740
|
+
|
|
741
|
+
```yaml
|
|
742
|
+
schemas:
|
|
743
|
+
Message:
|
|
744
|
+
type: object
|
|
745
|
+
properties: # messages have topics and a text
|
|
746
|
+
topic:
|
|
747
|
+
type: object
|
|
748
|
+
properties: # topics have id and array of tags
|
|
749
|
+
id:
|
|
750
|
+
type: string
|
|
751
|
+
tags:
|
|
752
|
+
type: array
|
|
753
|
+
items:
|
|
754
|
+
type: object
|
|
755
|
+
properties: # tags have a name
|
|
756
|
+
name:
|
|
757
|
+
type: string
|
|
758
|
+
text:
|
|
759
|
+
type: string
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
Previously the following DTO objects were generated from this schema:
|
|
763
|
+
|
|
764
|
+
```java
|
|
765
|
+
Message(MessageTopic topic, String text)
|
|
766
|
+
MessageTopic(String id, List<MessageTags> tags)
|
|
767
|
+
MessageTags(String name)
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
With the updated (correct) schema naming convention the result will be the following:
|
|
771
|
+
|
|
772
|
+
```java
|
|
773
|
+
Message(MessageTopic topic, String text)
|
|
774
|
+
MessageTopic(String id, List<MessageTopicTags> tags)
|
|
775
|
+
MessageTopicTags(String name)
|
|
776
|
+
```
|
|
777
|
+
|
|
735
778
|
### From `6.x.x` to `7.0.0`
|
|
736
779
|
|
|
737
780
|
Only effects the `stubby` target. Whether a Docker image is needed to be generated from the output, it needs to be explicitly configured using the new `generateWithDocker` parameter.
|
package/package.json
CHANGED
|
@@ -17,5 +17,9 @@
|
|
|
17
17
|
"DateTime": "java.time.Instant",
|
|
18
18
|
"java.time.OffsetDateTime": "java.time.Instant",
|
|
19
19
|
"org.springframework.core.io.Resource": "org.springframework.web.multipart.MultipartFile"
|
|
20
|
+
},
|
|
21
|
+
"inlineSchemaNameDefaults": {
|
|
22
|
+
"arrayItemSuffix": "",
|
|
23
|
+
"mapItemSuffix": ""
|
|
20
24
|
}
|
|
21
25
|
}
|