-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
fixed Bean Validation pattern issue #19747 #19748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
is there an issue or spec we can refer to for reproducing the issue and confirming the fix cc @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @martin-mfg (2023/08) |
I was able to reproduce this issue with generator openapi: 3.0.3
info:
version: 0.1.2
title: no title
paths: {}
components:
schemas:
myObj:
type: object
properties:
UUID:
type: string
format: uuid
maxLength: 36The changes in this PR are apparently copied from #18900. The motivation for these changes is given in #18095. [PS: After writing this I spotted in the PR title that this PR is related to #19747, which also provides an example.] To successfully compile the output of my above example, you have to manually revert this change. I can open a separate PR to revert the |
|
Hi Martin / OpenApi
Setting useBeanValidation=false will of course make the error go away, but
then no bean validation at all will happen, which is not what we like.
Currently we're using our own version of beanValidationCore.mustache, but
this is feasible for the future, since we are not getting updates then.
I can locally test the effect of putting {{^isUuid}} and {{/isUuid}} around
content in beanValidationCore.mustache, but I don't know what else to do.
I'm a little uncertain what I should do from here ?
Please advise.
Best
Christian
…On Thu, 14 Nov 2024 at 11:19, martin-mfg ***@***.***> wrote:
is there an issue or spec we can refer to for reproducing the issue and
confirming the fix
I was able to reproduce this issue with generator java, library
microprofile, additionalSetting useBeanValidation=true and this input
spec:
openapi: 3.0.3info:
version: 0.1.2
title: no titlepaths: {}components:
schemas:
myObj:
type: object
properties:
UUID:
type: string
format: uuid
maxLength: 36
The changes in this PR are apparently copied from #18900
<#18900>. The
motivation for these changes is given in #18095
<#18095>.
[PS: After writing this I spotted in the PR title that this PR is related
to #19747 <#19747>,
which also provides an example.]
To successfully compile the output of my above example, you have to
manually revert this change
<https://github.com/OpenAPITools/openapi-generator/pull/18124/files#diff-e546cc1b28c3178a3436973151db0f16c7389b2f9a80ac74cea8ba5ace8cc77f>.
I can open a separate PR to revert the beanvalidation.version change and
add a new sample configuration to the CI to prevent this problem in the
future. Properly fixing microprofile to make it work with the new
beanvalidation.version seems to be more work. And I think it might make
more sense to spend my time reviewing PRs. What do you think @wing328
<https://github.com/wing328>?
—
Reply to this email directly, view it on GitHub
<#19748 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAODXKHA6LVLTD7GEYEM5232AR2KBAVCNFSM6AAAAABPHCHSZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVHE2TIOBRGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Christian Skov
Egebjergvej 1, DK-8220 Brabrand
m: +45 2496 9346
@: ***@***.***
w: icandoit.dk
|
|
Hi @chrskov
Why do you mention setting
I think there's nothing for you to do. It's now up to the project maintainer to merge this PR. |
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)