-
-
Notifications
You must be signed in to change notification settings - Fork 950
fix(jsonschema): hashmaps produces invalid openapi schema #6830
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
fix(jsonschema): hashmaps produces invalid openapi schema #6830
Conversation
src/JsonSchema/Metadata/Property/Factory/SchemaPropertyMetadataFactory.php
Outdated
Show resolved
Hide resolved
|
@ostrolucky can you confirm this fixes your issue? |
5bba1f8 to
520c232
Compare
|
Not quite complete. Although it no longer does "additionalProperties": {
"type": "unknown_type"
}instead of expected "additionalProperties": {
"type": "object",
"properties": {"name": {"type": "string"}}
}it's doing "additionalProperties": {
"type": "string"
} |
src/JsonSchema/Metadata/Property/Factory/SchemaPropertyMetadataFactory.php
Outdated
Show resolved
Hide resolved
520c232 to
6119f8d
Compare
|
@ostrolucky Can you please do another test? It looks like this now |
6119f8d to
06d6227
Compare
|
I'm getting infinite loop now |
|
You have self referencing objects? This means that we need to track DTOs and actually create refs? |
src/JsonSchema/Metadata/Property/Factory/SchemaPropertyMetadataFactory.php
Outdated
Show resolved
Hide resolved
102c231 to
2e3fc91
Compare
|
I've come up with a fix, the first iteration wasn't good actually this almost worked we forgot to handle the |
* fix(jsonschema): hashmaps produces invalid openapi schema (#6830) * fix(jsonschema): hashmaps produces invalid openapi schema * fix --------- Co-authored-by: soyuka <[email protected]> * fix: add missing error normalizer trait and remove deprecated interface (#6853) * fix: test empty parameter against null (#6852) fixes #6844 * Fix deprecation symfony/dependency-injection * cs: run php-cs-fixer * ci: use problem error normalizer trait * fix(metadata): various parameter improvements (#6867) - `Parameter::getValue()` now takes a default value as argument `getValue(mixed $default = new ParameterNotFound()): mixed` - `Parametes::get(string $key, string $parameterClass = QueryParameter::class)` (but also `has` and `remove`) now has a default value as second argument to `QueryParameter::class` - Constraint violation had the wrong message when using `property`, fixed by using the `key` instead: --------- Co-authored-by: Vincent Amstoutz <[email protected]> Co-authored-by: mladencosa <[email protected]> Co-authored-by: Michiel Kalle <[email protected]>
…rm#6830) * fix(jsonschema): hashmaps produces invalid openapi schema * fix --------- Co-authored-by: soyuka <[email protected]>



3.4Key changes: