Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9ee186a

Browse files
Merge pull request #255 from regulaforensics/feature/42782
42782 - added two client generation modes
2 parents 9570369 + ac19371 commit 9ee186a

File tree

196 files changed

+2949
-1202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+2949
-1202
lines changed

‎.openapi-generator/VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.13.0
1+
7.15.0

‎Pipfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ idna = "==3.7"
1313
requests = ">=2.32.4"
1414
pydantic = ">=2"
1515
typing-extensions = ">=4.7.1"
16+
lazy-imports = "==1.0.1"
1617

1718
[dev-packages]
1819
wheel = "*"

‎Pipfile.lock‎

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dev.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,21 @@ and use next command from the project root.
1313

1414
## Generator configuration Features
1515

16-
1. When generating oneOf schemas, the generator creates its
16+
1. Two client generation modes have been added:
17+
strict (for client testing) and lenient (for release).
18+
In strict mode, the client will throw an exception if the
19+
types do not match or the required fields are missing;
20+
in lenient mode, error data will be output as a warning to
21+
the console. The templates for generating these modes
22+
are located in the generator-templates folder.
23+
2. When generating oneOf schemas, the generator creates its
1724
own abstract class, which does not look like it would like.
1825
The problem was solved by replacing the abstract generator
1926
class with ours using typeMappings in the generator config.
20-
2. The generator treats the discriminator value as a string,
27+
3. The generator treats the discriminator value as a string,
2128
but in our case it's numbers. To solve this problem, changes
2229
have been made to the model_generic.mustache template.
23-
3. By default, when the discriminator was unknown, the client
30+
4. By default, when the discriminator was unknown, the client
2431
threw an error. To avoid this, such models will be skipped.
2532
To solve this problem, changes have been made
2633
to the model_generic.mustache template.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /