825 Commits

Author SHA1 Message Date
Guilhem Niot
84973d52f5 Fix api-platform tests 2022-09-25 19:21:32 +02:00
Ivan Borisov
b4df34cdf7
Fix context namespace (#2032)
Co-authored-by: Ivan Borisov <electricheartdev@gmail.com>
2022-09-25 19:00:00 +02:00
Clément Lafont
83c81518c6
Fix methods in route annotation in documentation (#2028)
Fix the bad typo.
2022-09-11 12:19:38 +02:00
Guilhem Niot
fd45120d5c
Catch more precise exception in DocumentationController (#2027)
* Catch more precise exception in DocumentationController

* cs

* Fix tests
2022-09-03 13:18:46 +02:00
Guilhem Niot
766ed898cf
Make Model Attachable (#2025)
* Make Model Attachable

* fix cs

* Drop zircote/swagger-php < 4.2 support
2022-09-03 12:49:49 +02:00
Guilhem Niot
a17ad38cc8
Merge pull request #2026 from nelmio/GuilhemN-patch-1
Compute coverage with PHPUnit
2022-09-03 12:48:54 +02:00
Guilhem Niot
3183a2bffe
Update UtilTest.php 2022-09-03 12:40:23 +02:00
Guilhem Niot
aaf32cb2c2
Activate pcov 2022-09-03 12:36:23 +02:00
Guilhem Niot
78f81b996a
Update continuous-integration.yml 2022-09-03 12:32:11 +02:00
Guilhem Niot
4009e55b74
Compute coverage with PHPUnit 2022-09-03 12:29:51 +02:00
Guilhem Niot
27ed1cc28e
Merge pull request #2011 from magnetik/interfaces
The ObjectModelDescriber can support interfaces
2022-08-29 23:00:08 +02:00
Guilhem Niot
8e8c13ba57
Merge pull request #2012 from magnetik/autoconfigure
Add autoconfigure for model describer tag
2022-08-29 22:57:41 +02:00
Guilhem Niot
f0a4c07cb2
Merge pull request #2019 from goetas/context
use the configured context factory to create the serialization context
2022-08-29 22:56:41 +02:00
Asmir Mustafic
883049a9e0 use the configured context factory to create the serialization context 2022-08-22 20:45:23 +02:00
LALLAHOM Hamdi
3d38bba7cd
Update index.rst (#2015)
Replace "Symfony\Component\Serializer\Annotation\Group" by "Symfony\Component\Serializer\Annotation\Groups"
2022-08-04 11:58:28 +02:00
Baptiste Lafontaine
9050994bd4 The ObjectModelDescriber can support interfaces 2022-07-18 17:59:25 +02:00
Baptiste Lafontaine
c39a217ec4 Add autoconfigure for model describer tag 2022-07-18 17:59:11 +02:00
Baptiste Lafontaine
1cf58fbae0
Allow symfony/flex composer plugin (#2013) 2022-07-18 17:58:10 +02:00
Cyril VERLOOP
205828d18d
Fix typo "expect" to "except" in documentation. (#2008) 2022-07-15 23:16:37 +02:00
Guilhem Niot
dcc1cd8964
Fix parameter sharing example (#2004) 2022-06-11 09:56:29 +02:00
Guilhem Niot
c1f4383fc0 Increase tests memory limit 2022-06-11 09:54:36 +02:00
Guilhem Niot
f33eee70fc
Catch a more precise exception in Swagger controller (#2005) 2022-06-10 23:17:15 +02:00
Christopher Davis
235963df41
Merge pull request #1902 from chrisguitarguy/constraint_groups
Respect Constraint Validation Groups When Describing Models
2022-06-10 16:15:42 -05:00
Guilhem Niot
a6f25da106
Detect when a model is used for a form type (#1834)
* Detect when a model is used for a form type

* typo

* Add a test + Fix implementation

* CS
2022-06-10 22:41:24 +02:00
Guilhem Niot
b2b6d0f798
Merge pull request #1999 from chrisguitarguy/rm_inline_styles
Remove Inline Styles in Favor of the Stylesheet
2022-06-10 21:27:23 +02:00
Guilhem Niot
938b954a30
Merge pull request #1986 from WedgeSama/master
Add previous exception to BadRequestHttpException on SwaggerUiController
2022-06-10 20:55:12 +02:00
Guilhem Niot
be8499ffdc
Merge pull request #1988 from nelmio/ROOTCONTEXT
Use the same root context everywhere
2022-06-10 20:52:06 +02:00
Guilhem Niot
ee1fabe245
Merge pull request #2003 from nelmio/GuilhemN-patch-2
Clarify default policy on routes
2022-06-03 19:14:32 +02:00
Guilhem Niot
ba28741721
Merge pull request #2000 from stopfstedt/with_annotation
corrects config option name in docs.
2022-05-31 14:19:20 +02:00
Guilhem Niot
7520ef407f
Clarify default policy on routes 2022-05-31 14:17:59 +02:00
Guilhem Niot
ed33ee8e4a
Fix the docs 2022-05-31 14:09:25 +02:00
Guilhem Niot
7803c7365e
Merge pull request #2002 from fluffycondor/fix-twig-suggestion
Fix wrong package name in suggest section
2022-05-31 14:03:36 +02:00
fluffycondor
075f4eec1c
Fix wrong package name 2022-05-27 17:44:13 +03:00
Stefan Topfstedt
89194219f9 corrects config option name in docs. 2022-05-18 11:55:35 -07:00
Christopher Davis
49bad6743c Remove Inline Styles in Favor of the Stylesheet
Should fix https://github.com/nelmio/NelmioApiDocBundle/issues/1770
2022-05-16 08:56:52 -05:00
Christopher Davis
a697792092 Merge remote-tracking branch 'origin/master' into constraint_groups 2022-05-12 18:45:41 -05:00
Guilhem Niot
0220f641ed
Merge pull request #1997 from nelmio/CIDOCS
Add a Github Action to lint the docs
2022-05-13 00:00:26 +02:00
Guilhem Niot
7bc9462e7e Fix DOCtor-RST errors 2022-05-12 23:59:36 +02:00
Guilhem Niot
5195058abb Add a Github Action to lint the docs 2022-05-12 23:59:12 +02:00
Christopher Davis
ccd3689faa Expand the Documentation on Groups to Include Validation
With some examples of objects and the use of model as well as some
implications for generated code.
2022-05-11 08:52:48 -05:00
Christopher Davis
6b2ef45b24 Merge remote-tracking branch 'origin/master' into constraint_groups 2022-05-11 08:18:52 -05:00
Christopher Davis
d27cc8fc3b
Merge pull request #1994 from virtualize/master
fixed doc typo that broke the models section
2022-05-11 08:07:17 -05:00
Christoph Wieseke
fdb2182834
fixed doc typo the broke the models section 2022-05-09 16:31:09 +02:00
Tobias Sette
f66ab2a516
docs(commands.rst): fix command name (#1989) 2022-05-02 22:39:33 +02:00
Christopher Davis
da02f3ad33
Stop Model Property Description When a Schema Type or Ref is Already Defined (#1978)
* Return a Result Object from AnnotationsReader::updateDefinition

This is so we can make a decision on whether or not a schema's type or
ref has been manually defined by a user via an `@OA\Schema` annotation
as something other than an object.

If it has been defined, this bundle should not read model properties any
further as it causes errors.

I put this in AnnotationReader as it seemed the most flexible in the
long run. It could have gone in `OpenApiAnnotationsReader`, but then any
additional things added to `updateDefinition` could be left out of the
decision down the road. This is also a convenient place to decide this
once for `ObjectModelDescriber` and `JMSModelDescriber`.

* Stop Model Describer if a Schema Type or Ref Has Been Defined

Via the result object added in the previous commit.

This lets user "short circuit" the model describers by manually defining
the schema type or ref on a plain PHP object or form. For example,
a collection class could be defined like this:

    /**
     * @OA\Schema(type="array", @OA\Items(ref=@Model(type=SomeEntity::class)))
     */
     class SomeCollection implements \IteratorAggregate { }

Previously the model describer would error as it tries to merge the
`array` schema with the already defiend `object` schema. Now it will
prefer the array schema and skip reading all the properties of the
object.

* Add a Documentation Bit on Stopping Property Description

* Mark UpdateClassDefinitionResult as Internal
2022-04-30 20:28:05 +02:00
Krystian Marcisz
6ac4f07872
[Docs] Add PHP Attributes examples (#1985)
* [Docs] Add PHP Attributes examples

* Fix namespaces
2022-04-30 20:25:41 +02:00
Guilhem Niot
cb03d99c97 Remote Context::root() usage 2022-04-30 20:20:38 +02:00
Guilhem Niot
5d747aefc3 fix CS 2022-04-30 20:10:00 +02:00
Guilhem Niot
52e7fc4de1 Use the same root context everywhere 2022-04-30 20:07:44 +02:00
Benjamin Georgeault
42349cb4cf Add previous exception to BadRequestHttpException on SwaggerUiController. Improve debug. 2022-04-27 10:08:37 +02:00