* Apply `enum` from Choice Constraints to Items When Choice is Multiple
Otherwise JSON schema like this is generated:
```
"property": {
"type": "array",
"enum": ["one", "two", "three"],
"items": {
"type": "string"
}
}
```
With this change, however, this schema is generated:
```
"property": {
"type": "array",
"items": {
"type": "string",
"enum": ["one", "two", "three"]
}
}
```
A possible downside here is that the symfony constraint stuff happens
before types are figured out from PHPDoc. So it's _possible_ to end up
with something that won't validated. Take something like this:
```
/**
* @Assert\Choice(multiple=true, choices={"..."})
* @var string
*/
```
This would generate:
```
"property": {
"type": "string",
"items": {
"enum": ["..."]
}
}
```
* Fix CS
* cs
* more cs
* fix tests
Co-authored-by: Guilhem Niot <guilhem@gniot.fr>
* Initial pass for OA3 upgrade
* Fix Util Tests
* Fix first batch of Unit Tests. Up to Model
* Another batch of fixed tests
* Update annotations
* Convert Model & Property Describers
* Update tests, Fix RouteDescribers, FIx additional bugs
* Another batch of updates
* Another batch of fixed Functional Tests
* Fix FunctionalTest tests
* Fix Bazinga Tests
* FIx FOS Rest
* Fix JMS TEsts & describers
* Fix all Tests
* Fix few stuff from own CR
* CS Fixes
* CS Fixes 2
* CS Fixes 3
* CS Fixes 4
* Remove collection bug
* Updates after first CRs
* CS
* Drop support for SF3
* Update the docs
* Add an upgrade guide
* misc doc fixes
* Configurable media types
* Code Style Fixes
* Don't use ::$ref for @Response and @RequestBody
* Fix upgrading guide
* Fix OA case
Co-authored-by: Filip Benčo <filip.benco@websupport.sk>
Co-authored-by: Guilhem Niot <guilhem.niot@gmail.com>
Co-authored-by: Mantis Development <mantis@users.noreply.github.com>
* allow model describers on jms custom types
* add fallback describer
* test custom type def
* remove object_fallback describer from the container when jms is not active
- Add minimum and maximum from the range annotation
- Add maximum from the LessThan and LessThanOrEqual annotation
FIX: remove the extra date-time format, which was not standard and not in sync with what symfony exposes
Swagger specifies that date-time should follow the RFC3339, and this is what symfony does as default.
* [JMSModelDescriber] Allow to use free form objects from JMS serialization
* Remove unused variable
* Refactor `describeItem()`
* Add more tests
* early detect of free form objects
* Add test for array property without type
* Merge `findPropertyType()` and `registerPropertyType()` methods
* Update `registerPropertyType()` in order to set "object" as type for arrays with undefined item types
* Set "additionalProperties" definition for arrays without defined items
* Simplified `registerPropertyType()`
* Merged `registerPropertyType()` into `describeItem()`
* Fix comment
* Fix comment
* if the group does not define per property exclusion, then remove possible obsolete property exclusions
* if the group is using only the default group, then is as not defining a group
* test that the user does not get a new alias just because another property pf the same object has some groups
* use strict comparison
* fix(SymfonyConstraintAnnotationReader): fixed enum guessing in Assert\Choicewhen callback parameter is used
* fix(SymfonyConstraints): turn double quotes in single quotes