Asmir Mustafic
66bcf02903
when the naming strategy is not available, we are using jms/serializer 2.0
2019-01-26 20:55:29 +01:00
Guilhem N
0bca7f377d
Merge pull request #1447 from AyrtonRicardo/master
...
Change validation to allow fields described as DateTimeInterface.
2019-01-02 23:20:13 +01:00
Romain BigZ Richard
9968027aad
feature: Add new validation from constraints.
...
- 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.
2018-12-19 16:25:14 +01:00
Ayrton Ricardo
2ddf4362c0
Change validation to allow fields described as DateTimeInterface.
2018-12-10 14:21:09 +01:00
Guilhem Niot
76f25393c5
Fix alternative names issue
2018-11-04 12:24:45 +01:00
Asmir Mustafic
9bae1115d6
jms serializer group names are based on the internal property name, not on the serialized name ( #1421 )
2018-10-17 17:19:37 +02:00
Asmir Mustafic
7f78ef9ba6
Restore jms nested groups feature ( #1402 )
...
* fix missing variable definition
* fix caching typo
* do not pre allocate reserved names
* use model hash instead of spl hash
* register later the model
2018-10-10 17:24:13 +02:00
Guilhem N
67ff6bd1e1
Merge pull request #1403 from goetas/boolean-enums
...
Add boolean enums support to forms
2018-10-04 20:36:41 +02:00
Piotr Antosik
a9d6b3fd46
Fix choice annotation with callback method name without class
2018-09-26 16:51:43 +02:00
Asmir Mustafic
bf01a8e019
add boolean enums support to forms
2018-09-24 17:35:57 +02:00
Pavel Batanov
995ade1c8d
Respect property name for constraints
2018-09-11 13:42:50 +03:00
Guilhem N
99833189fd
Ignore Type::$nullable ( #1391 )
2018-08-30 01:10:36 +02:00
Guilhem N
fcb36d8e8d
AssertLength doesn't make the field required ( #1389 )
2018-08-30 00:32:11 +02:00
eaunitrust
f0b1eb7849
master: RepeatedType added ( #1387 )
...
* master: RepeatedType added
* Fix RepeatedType support
2018-08-30 00:16:19 +02:00
Rob Holmes
309f935763
Added support for Doctrine MongoDB ODM 'document' form type ( #1377 )
...
* Added support for Doctrine MongoDB ODM 'document' form type
* Simplify code
2018-08-29 23:14:19 +02:00
Asmir Mustafic
bd26696f8f
respect jms serializer nested group exclusion
2018-08-26 22:58:35 +02:00
Javier Spagnoletti
df9893428e
[JMSModelDescriber] Allow to use free form objects from JMS serialization ( #1368 )
...
* [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
2018-08-21 17:41:32 +02:00
Guilhem N
619ae0d5ae
Support doctrine Collection ( #1369 )
2018-07-27 08:30:22 +02:00
Asmir Mustafic
09e6f30572
Jms serializer default groups should not generate new definitions when possible ( #1367 )
...
* 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
2018-07-26 14:14:26 +02:00
imajim
6e04137ee6
CollectionType not working in example tab ( #1360 )
...
* CollectionType not working in example tab
Removed just line 179 and collectionType now working in example tab
* Fix comments
2018-07-26 14:04:33 +02:00
Javier Spagnoletti
1063972c27
[JMSModelDescriber] Update JMSModelDescriber
in order to iterate over nested array definitions ( #1365 )
2018-07-23 18:35:05 +02:00
Palluel-Lafleur Frédéric
c2f036c159
fix(SymfonyConstraintAnnotationReader): fixed enum guessing in Assert… ( #1325 )
...
* fix(SymfonyConstraintAnnotationReader): fixed enum guessing in Assert\Choicewhen callback parameter is used
* fix(SymfonyConstraints): turn double quotes in single quotes
2018-05-20 15:59:52 +02:00
Marek Štípek
22ec4fb83b
Fixing FormModelDescriber entity form type description regression
2018-05-13 20:36:53 +02:00
Marek Štípek
b4ba46f9c2
Support for extended builtin form types
2018-05-10 01:01:26 +02:00
Guilhem N
304b3f5816
Merge pull request #1313 from phansys/modeldescriber
...
Normalize description for classes implementing `\DateTimeInterface`
2018-05-05 23:20:03 +02:00
Asmir Mustafic
4253ff6b67
Merge pull request #1277 from goetas/bazinga-hateoas
...
Add basic BazingaHateoasBundle support
2018-05-05 14:49:17 +02:00
Javier Spagnoletti
dbd2076921
Normalize description for classes implementing \DateTimeInterface
2018-05-04 15:22:18 -03:00
Asmir Mustafic
af30c6ac0e
handle form collection with type introspection
2018-04-27 12:43:42 +02:00
Asmir Mustafic
c5b1d538f8
Improve support for JMS dictionaries (associative arrays) ( #1301 )
...
* improve support for JMS dictionaries (associative arrays)
Doc: https://swagger.io/docs/specification/data-models/dictionaries/
* use schema merge instead of reflection
2018-04-21 16:57:37 +02:00
Jerzy Lekowski
3b2d9da6c2
Fix #1283 : Invalid swagger.json generation - definition for entities with Assert\NotBlank and Assert\Length
2018-04-09 10:53:43 +01:00
Dmytro Boiko
badcc8abdd
Fixed #1276 : Symfony Serializer Groups cause Exception while parsing
2018-04-05 15:54:51 +03:00
Guilhem Niot
8026ff46eb
Support `@Model
` in in-object annotations
2018-03-22 19:14:01 +01:00
Guilhem Niot
7d99a96cf4
Allow to change a property name
2018-02-19 21:42:56 +01:00
Guilhem N
37efa7228b
Add a documentation form extension ( #1234 )
...
* Adding format and example extensions. Getting child type better for collections
Fixing copyrights
Fixing style issues
Fixing style issues
Fixing style issues
* Adding DocumentationExtension
* Adding error for invalid properties
* Reverting switch
* Missing entity break
* Removing unecessary doc
* Removing unecessary method
* Style change
* Adding break for number, integer, and text types
* Extracts the documentation form extension
2018-02-19 10:56:51 +01:00
Guilhem N
e0ce82f8ad
Fix ObjectDescriber
2018-02-14 13:51:06 +01:00
fredrocheron
72010c1d98
FormModelDescriber: set type to array with correct example for multiple choices form. ( #1212 )
...
* FormModelDescriber: set type to array with correct example for multiple choices form.
* Remove arrays examples and add test for multiple ChoiceType form
* Use of "items" for multiple ChoiceType form.
Detect "choices" type to determine property or items type.
Remove unused variable declaration.
2018-02-03 12:52:43 +01:00
Martijn van Kempen
dad7f77351
Nullable patterns no longer throw exceptions ( #1210 )
...
Nullable patterns no longer throw exceptions
2018-01-26 17:09:38 +01:00
Martijn van Kempen
b07043ce33
Added Symfony constraint annotation reader ( #1202 )
...
* Added Symfony constraint annotation reader
* StyleCI analysis changes
* StyleCI analysis
* StyleCI analysis
* No longer adding the constraint description for NotBlank and NotNull
* Updated doc comment
* Removed @param
* Removed the AbstractComparison condition
* Using Assert and removed unused method
2018-01-25 14:59:48 +01:00
Guilhem N
f193fdb1f1
Inject the AnnotationsReader in Model describers instead of internal classes ( #1203 )
2018-01-24 19:58:38 +01:00
Robert Gruber
fe9d12772b
Add some missing property attributes for JMS model describer ( #1196 )
...
* Add some missing property attributes for JMS model describer
* Introduce own Swagger definition annotation reader
* Shorten annotation mapping by using merge
2018-01-24 15:20:20 +01:00
Guilhem N
eda4a0a340
Always require phpdocumentor/reflection-docblock ( #1186 )
2018-01-13 14:18:13 +01:00
Guilhem Niot
b73ce1fc06
Fixes
2018-01-13 13:29:45 +01:00
Guilhem N
73a5f104d6
Use @SWG\Parameter type when set instead of throwing ( #1174 )
...
* Add an exception
* Just use the manually defined type when set
* Update the jms model describer
2018-01-11 12:26:59 +01:00
Guilhem Niot
eb77f3708c
Cleanup
2018-01-04 11:34:23 +01:00
Guilhem N
8a53891ee9
Merge pull request #1132 from 7thcubic/complex_groups
...
Fix complex groups context for jms models
2018-01-03 12:01:06 +01:00
David Buchmann
f4a9ad7ef7
do not fail if phpdocumentor is not available
2017-12-28 10:46:05 +01:00
David Buchmann
75cf1201ed
Apply fixes from StyleCI
2017-12-22 17:42:18 +00:00
Guilhem N
48107de67d
Merge branch 'master' into complex_groups
2017-12-21 17:17:36 +01:00
Guilhem N
8a57f39d01
Merge pull request #1152 from dbu/jms-php-docblocks
...
parse phpdoc annotations in jms models
2017-12-21 17:12:42 +01:00
David Buchmann
72c8c80d9c
adjust to feedback
2017-12-19 23:14:57 +01:00