@team-supercharge/oasg 14.1.0-feature-python-fastapi-e25c0a08.0 → 14.1.0
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/README.md +49 -0
- package/package.json +1 -1
- package/targets/angular/generate.sh +4 -0
package/README.md
CHANGED
@@ -454,6 +454,20 @@ Common target parameters
|
|
454
454
|
| packageName | Name of the generated NPM package | Y | - |
|
455
455
|
| repository | URL of the NPM package registry | Y | - |
|
456
456
|
|
457
|
+
##### Known issue: breaking dependencies
|
458
|
+
|
459
|
+
The Angular target has a known issue related to dependency versioning. The generated Angular project's `package.json` currently defines multiple dependencies with flexible versions (e.g., using `^` or `~` in version constraints). This flexibility allows newer versions of dependencies (not to mention the transitive dependencies), to be pulled in, which can occasionally lead to breaking changes.
|
460
|
+
|
461
|
+
A notable instance of this issue occurred with **Angular version 12**, which introduced changes that broke the build of generated projects. To address this specific case, we implemented a **temporary fix** in the `targets/angular/generate.sh` script. This script now manually installs problematic dependencies with fixed, validated versions.
|
462
|
+
|
463
|
+
###### Long-Term Solution
|
464
|
+
|
465
|
+
We are actively discussing a long-term solution to this issue. Potential approaches include implementing dependency version locking mechanisms (`package-lock.json`) per Angular versions.
|
466
|
+
|
467
|
+
The temporary fix may not cover all future breaking changes from other dependencies. Projects using different versions of Angular may encounter issues if the fix does not align with their specific requirements.
|
468
|
+
|
469
|
+
We welcome feedback and contributions to help address this issue.
|
470
|
+
|
457
471
|
#### `react`
|
458
472
|
|
459
473
|
```json
|
@@ -825,6 +839,41 @@ describe('Auth', function () {
|
|
825
839
|
- array of enums in query/header/path/form parameters are not validated (stay as string)
|
826
840
|
- no multidimensional array validation in DTOs
|
827
841
|
|
842
|
+
**Validation availability:**
|
843
|
+
<br> _List is not comprehensive, missing items are definitely not currently supported_
|
844
|
+
|
845
|
+
| Validation | DTO | Query | Header | Path |
|
846
|
+
| ---------------------------------------- | --- | ----- | ------ | ---- |
|
847
|
+
| **Common** | | | | |
|
848
|
+
| IsOptional _(!required)_ | ✅ | ✅ | ✅ | ✅ |
|
849
|
+
| IsDefined _(required)_ | ✅ | ✅ | ✅ | ✅ |
|
850
|
+
| **Types** | | | | |
|
851
|
+
| IsBoolean | ✅ | ✅ | ✅ | ✅ |
|
852
|
+
| IsDate _(isDate, isDateTime)_ | ❌ | ❌ | ❌ | ❌ |
|
853
|
+
| IsString | ✅ | ✅ | ✅ | ✅ |
|
854
|
+
| IsNumber _(isNumber, isFloat, isDouble)_ | ✅ | ✅ | ✅ | ✅ |
|
855
|
+
| IsInt _(isInt, isLong)_ | ✅ | ✅ | ✅ | ✅ |
|
856
|
+
| IsInt _(isShort, isUnboundedInteger)_ | ❌ | ❌ | ❌ | ❌ |
|
857
|
+
| IsEnum | ✅ | ✅ | ✅ | ✅ |
|
858
|
+
| IsArray | ✅ | ✅ | ✅ | ✅ |
|
859
|
+
| **String** | | | | |
|
860
|
+
| MinLength | ❌ | ❌ | ❌ | ❌ |
|
861
|
+
| MaxLength | ❌ | ❌ | ❌ | ❌ |
|
862
|
+
| Matches _(pattern)_ | ✅ | ✅ | ✅ | ✅ |
|
863
|
+
| IsUUID _(isUuid)_ | ❌ | ❌ | ❌ | ❌ |
|
864
|
+
| IsDataURI _(isUri)_ | ❌ | ❌ | ❌ | ❌ |
|
865
|
+
| IsEmail _(isEmail)_ | ❌ | ❌ | ❌ | ❌ |
|
866
|
+
| **Number** | | | | |
|
867
|
+
| Min | ❌ | ❌ | ❌ | ❌ |
|
868
|
+
| Max | ❌ | ❌ | ❌ | ❌ |
|
869
|
+
| IsDivisibleBy _(multipleOf)_ | ❌ | ❌ | ❌ | ❌ |
|
870
|
+
| IsDecimal _(isDecimal)_ | ❌ | ❌ | ❌ | ❌ |
|
871
|
+
| **Array** | | | | |
|
872
|
+
| multidimensional array | ❌ | ❌ | ❌ | ❌ |
|
873
|
+
| enum arrays | ✅ | ❌ | ❌ | ❌ |
|
874
|
+
|
875
|
+
|
876
|
+
|
828
877
|
#### `openapi`
|
829
878
|
|
830
879
|
```json
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@team-supercharge/oasg",
|
3
|
-
"version": "14.1.0
|
3
|
+
"version": "14.1.0",
|
4
4
|
"description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
|
5
5
|
"author": "Supercharge",
|
6
6
|
"license": "MIT",
|
@@ -15,5 +15,9 @@ java -jar $binary generate \
|
|
15
15
|
|
16
16
|
cd out/$targetId
|
17
17
|
npm install
|
18
|
+
# This is a workaround for an issue with the angular generator. Root cause is the missing package-lock.json: https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/typescript-angular
|
19
|
+
# some of the transitive dependency has @types/node@": "*" in their package.json
|
20
|
+
# use "npm explain @types/node" in the generated folder (./out/$TARGET) to get more info
|
21
|
+
npm install --save-dev @types/node@20.15.0
|
18
22
|
npm run build
|
19
23
|
cd ../..
|