192 Commits

Author SHA1 Message Date
Guilhem Niot
ad4e5551f5 Merge remote-tracking branch 'origin/3.x' into HEAD 2020-07-12 15:07:56 +02:00
Guilhem Niot
8948d5418b
Add methods metadata support for models (#1678)
* Add methods metadata support for models

* fix cs
2020-07-12 14:54:39 +02:00
Guilhem Niot
d167685f42 Merge remote-tracking branch 'origin/3.x' into HEAD 2020-07-11 18:12:14 +02:00
Guilhem Niot
f420532121
Support using annotations only at the class level of controllers (#1668)
* Support using annotations only at the class level of controllers

* Fix dependencies

* Bump dependency
2020-07-11 17:53:09 +02:00
Guilhem Niot
7d9573ddf6
Move the OpenApi processing to ApiDocGenerator (#1671)
* Move the OpenApi processing to ApiDocGenerator

* Temporary fix for https://github.com/zircote/swagger-php/pull/791

* Stop using the ModelRegistry in OpenApiPhpDescriber
2020-07-06 19:50:34 +02:00
pratyam
fe39acd6a8
Bugfix/remove pattern from property expression message error (#1670)
* remove pattern added from the Expression Violation message.

This string confuses the API client showing a violation message instead of having a Regex. Any informatory message for the client should be placed in "description"

* fix tests

* fix typo
2020-07-04 16:27:40 +02:00
Guilhem Niot
3623bdb1ea
Fix the Util class manipulation of array of objects (#1653)
* Fix the Util class manipulation of array of objects

* fix cs
2020-06-17 14:12:44 +02:00
Filip Benčo
d932b06bbb
Add support for compound properties (#1651)
* Add support for compound properties

* Fix CS & Tests

* Another fixing :D

* Final CS fix

* Allow complex compound properties

* cs

* Update the Upgrading guide

* Update php doc

* Add Support for Nullable properties

* Fix CS

* Fix CS

* Add Support for Nullable Types & Schemas as in OA3

* Update Nullable Property handling

* CS

* Fix tests

* Accept also nullable config for Alternative model names

* Refactor nullable refs

* Fix CS & Tests

* Another CS

* Revert "Another CS"

This reverts commit 03ada32b3263f3537d2af63f0abe79bd4a9ac0b5.

* Revert "Fix CS & Tests"

This reverts commit 369f2ccd170aebeeb9d87e9e00cba5cea62d5529.

* Revert "Refactor nullable refs"

This reverts commit 91cdf6fd0130f3ebf415de99f8a91edbc764255e.

* Revert "Revert "Refactor nullable refs""

This reverts commit 0e50fc1938ce3e620fc655a7d1e9284a9f8c24f0.

* Revert "Revert "Fix CS & Tests""

This reverts commit 228d3ca994eb4622c4db81aaa5f32845862e5616.

* Revert "Revert "Another CS""

This reverts commit a5b08dedf5bca8fb711b816c62bed2de9f1c9521.

* Improve nullable refs description

Co-authored-by: Filip Benčo <filip.benco@websupport.sk>
Co-authored-by: Guilhem Niot <guilhem.niot@gmail.com>
2020-06-16 13:11:53 +02:00
Guilhem Niot
d558560f61
Remove deprecated features (#1640)
* Remove deprecated features

* Fix cs
2020-05-31 18:18:29 +02:00
Guilhem Niot
58f791c0f7 Merge branch '3.x' 2020-05-31 17:54:32 +02:00
Guilhem Niot
1f4dfb0b2b
Add FOSRestBundle 3.x support (#1637)
* Add FOSRestBundle 3.x support

* fix cs

* Update phpunit config

* Fix deprecations

* Fix tests when running with fosrest < 2.8

* revert change
2020-05-31 17:47:18 +02:00
Mantis Development
239a26d014
Fix Declaration must be compatible error with tests (#1638)
* Fix Declaration must be compatible error with tests

* Fix phpunit deprecation warnings for @expectedExceptions

* Add phpunit.bat for windows users, bump phpunit to version 7.5
2020-05-31 15:16:51 +02:00
Mantis Development
b3c53beead
Add dump command to print out swagger JSON. (#1537) (#1540)
* Add dump command to print out swagger JSON.

Command outputs to stdout, so can be redirected to a file.
Pretty prints output by default.
--no-pretty can be passed to remove whitespace from json output if it does not need to be human readable

* Update for styleci corrections

* Fix CS and add type hint

* REbase + Updates to documentation of dump command.

* Remove defaultName - config file specifies this
Add return value to dump command

* Update for OA3

* Add a test case

* update command name

* Fix the tests

Co-authored-by: Guilhem Niot <egetick@gmail.com>
Co-authored-by: Guilhem Niot <guilhem.niot@gmail.com>
2020-05-31 11:39:50 +02:00
Mantis Development
5e6b894bdc
Fix User Warning: Multiple definitions for @OA\\Property()->title (#1630)
* Fix User Warning: Multiple definitions for @OA\\Property()->title

* Add test

* Pass CI..
2020-05-31 10:30:13 +02:00
Guilhem Niot
4027fe8b6c
Fix access to api->components in RouteMetadataDescriber (#1635)
* Fix access to api->components in RouteMetadataDescriber

* cs
2020-05-30 18:24:51 +02:00
Guilhem Niot
82d766bfe4 Merge branch 'v3' 2020-05-30 18:23:49 +02:00
Guilhem Niot
dfff2476d8
Add @SerializedName support (#1636)
* Add `@SerializedName` support

* Also test `@SerializedName` on properties

* Fix tests with sf < 4.2

* Fix the tests

* Update the CHANGELOG
2020-05-30 18:08:25 +02:00
Guilhem Niot
fb84e36fdf
Fix #1628 : annotations construction is context dependant (#1632)
* Fix #1628 : since annotations construction is context dependant, we cannot use the cached annotations reader

* CS

* Small improvement

* cs
2020-05-29 21:52:06 +02:00
Filip Benčo
78664ef9ec
OpenApi 3 Support (#1623)
* 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>
2020-05-28 13:19:11 +02:00
Asmir Mustafic
2fd95e2242
add support for jms serializer inline property feature 2020-05-07 20:02:10 +02:00
Pierre Grimaud
3b6fbf936d Fix typos 2020-04-21 23:47:33 +02:00
Guilhem Niot
ab014fe032
Merge pull request #1602 from katin-dev/master
Fix generating example for Assert\Choice when choices are object not array
2020-03-31 12:05:08 +02:00
katin-dev
97530a6eee #1601 test for Assert\Choice results in numeric array 2020-03-14 15:36:59 +03:00
Guilhem Niot
1a9a5d7ce6
Merge pull request #1552 from cyberemissary/duplicate-param-cleanup
Added describer that removes duplicate parameters when using $ref.
2020-03-14 11:41:27 +01:00
Guilhem Niot
b88793267e Use FOSRest *Param::$key when defined 2020-02-21 10:42:13 +01:00
cyberemissary
94f7715f68 Refactor Existing Ref parsing in RouteMetadataDescriber 2020-02-06 18:44:17 -05:00
Guilhem Niot
3710e95d26 Rework PR 2020-01-09 21:45:37 +01:00
cyberemissary
9b9dbe69dd Added describer that removes duplicate parameters when using $ref. 2020-01-09 14:29:52 -05:00
smoench
6f7c1fa870
remove FOSRest on symfony 5 test runs as FOSRest does not support symfony 5 yet 2019-12-20 10:52:36 +01:00
smoench
0d6a1591c8
fix compatibility with symfony 5 2019-12-19 15:41:14 +01:00
Maxime Helias
bfcbf59caf Allow Symfony 5 2019-11-29 13:59:27 +01:00
Guilhem Niot
bea1faec94
Merge pull request #1558 from maxhelias/fix-travis
Fix build travis
2019-11-21 18:12:47 +01:00
Piotr Antosik
e8d4afd1af
Fix tests 2019-11-21 11:41:06 +01:00
Maxime Helias
3888d6b976 Fix build travis 2019-11-20 12:15:00 +01:00
Paweł Mikołajczuk
14e4eedbad Merge pull request #1522 from ahilles107/port/options_support_in_model
Port/options support in model
2019-06-01 15:31:09 +02:00
Asmir Mustafic
eb255010a0 Support typed embedded relation with willdurand/hateoas 3.0 (#1510)
* allow typed embedded relation with hateoas 3.0

* symfony/framework-bundle 4.2.7 is broken

https://github.com/symfony/symfony/pull/31156

* internal public methods
2019-05-02 10:02:16 +02:00
Asmir Mustafic
65e940f7f8
use jms serialization groups detection 2019-04-17 22:05:30 +02:00
Serhii Kondratiuk
ccad10aae1 Added name_patterns filter option (#1504) 2019-04-16 17:22:50 +02:00
Asmir Mustafic
d6ea99420e Allow model describers on jms custom types (#1495)
* 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
2019-04-16 12:13:33 +02:00
Guilhem N
23b179a481
Fix the test suite (broken due to an update in Api-Platform) (#1498) 2019-04-10 21:07:34 +02:00
Ayrton Ricardo
253e71a46e Provide default host to generated .json documentation (#1492)
* Add default host to the current request host to keep the same behaviour as js does

* Add host to test case

* Revert deleted code

* Revert not needed update on expected result
2019-04-10 20:55:04 +02:00
neFAST
92790b1d28 FIX #1428 Make sure FormInterfaceConfig has a 'documentation' option … (#1429)
* FIX #1428 Make sure FormInterfaceConfig has a 'documentation' option before getting it

FIX #1428

* adding SubmitType to Tests

* Update UserType.php

* Update UserType.php

* Update FunctionalTest.php

* Update FunctionalTest.php

* removed check to see how unit test handles this

* Add test back

* Cs
2019-03-07 08:48:56 +01:00
Guilhem N
b171794cce
Merge pull request #1460 from babaorum/areas-in-annotation
add a way to filter areas on route by annotation
2019-02-13 19:32:19 +01:00
Guilhem N
78568a3150
Merge pull request #1433 from goetas/serializer-v2
Allow jms/serializer v2.0 and willdurand/Hateoas v3.0
2019-02-13 19:25:51 +01:00
babaorum
dcfa5e23e5 add a way to filter areas on route by annotation 2019-02-05 22:43:18 +01:00
Asmir Mustafic
fd7b5e1679
fix missing previous recursive call 2019-01-26 21:03:21 +01:00
Asmir Mustafic
0fb5d7afa2
jms 2.0 groups tested 2019-01-26 21:03:21 +01:00
Asmir Mustafic
d15b4123c1
add hateoas v3 compat 2019-01-26 20:55:52 +01:00
Guilhem N
edb54a1551
Merge pull request #1463 from MyHammer/fix-api-platform-documentation-decoration
Fix documentation decoration with API Platform
2019-01-23 13:42:03 +01:00
Alexander Wenzel
f1bb40c6e4 Fix #1462 by allowing all supported implementations of NormalizerInterface in ApiPlatformDescriber
> add test
2019-01-11 16:54:58 +01:00