79 Commits

Author SHA1 Message Date
Guilhem Niot
dcc1cd8964
Fix parameter sharing example (#2004) 2022-06-11 09:56:29 +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
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
Stefan Topfstedt
89194219f9 corrects config option name in docs. 2022-05-18 11:55:35 -07:00
Christopher Davis
a697792092 Merge remote-tracking branch 'origin/master' into constraint_groups 2022-05-12 18:45:41 -05:00
Guilhem Niot
7bc9462e7e Fix DOCtor-RST errors 2022-05-12 23:59:36 +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
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
05d16e6814
Add links to swagger php examples 2022-04-21 23:36:09 +02:00
Valentin Salmeron
35ea6f2759
Update areas.rst (#1983)
* Update areas.rst

'with_annotations' option is not mentioned in actual documentation

* Slight changes

* Rephrase
2022-04-21 23:18:01 +02:00
Bartłomiej Jakub Kwiatek
a362f869ad
correct indentation in configuration example 2022-03-04 20:09:11 +01:00
Jack Cutting
4bc12f1034 Add link to Security documentation to the Learn More section 2022-01-26 17:39:42 +00:00
Jack Cutting
9545a0ce52 Allow security policies to be removed using the Security annotation by passing it a name of null. 2022-01-26 17:33:35 +00:00
Guilhem Niot
a184cb8ef4
Fix deprecations (#1923) 2021-12-11 14:19:43 +01:00
jeremy
0ed76d7d24
Add Location of Original Template (#1897)
This doc page advises that one can `have a look at the original template to see which blocks can be overridden`, but does not say where the original template can be found.  This edit adds that information so that users don't have to resort to searching for keywords (like I just had to).

Note that I haven't run any tests as this is a docs-only change.
2021-11-04 00:13:42 +01:00
Guilhem Niot
200ec0fdcb Merge branch '3.x' 2021-11-04 00:06:42 +01:00
Quentin Stoeckel
653a1f1776
Fix path to index.html.twig in documentation (#1883)
This fixes a minor typo in [*Re-add Google Fonts* part of the documentation](https://symfony.com/bundles/NelmioApiDocBundle/current/faq.html#re-add-google-fonts): using an uppercase `i` breaks template override.
2021-10-06 19:29:54 +02:00
Frederik Holz
aa18c6c83b
[3.x]: Hide the default section per area with new config parameter (#1868)
* Add new config node disable_default_routes to prevent registering RouteDescriber to specific areas which allowes disabling rendering of default routes, Adjust tests accordingly

* Add documentation for new config variable

* Change disable_default_routes to filter route collection instead of disabling route describer, Add test for new handling in FilteredRouteCollectionBuilder

* Change naming of matching method for disabling default routes

* Fix codestyle issue

* Fix codestyle issue

* Change naming of dataProvider to match testing name

Co-authored-by: Frederik Holz <team-orange@auxmoney.com>
2021-10-06 19:28:59 +02:00
Mathieu Ducrot
1306106931
Update templates comment path for bundle override (#1864)
## Changelog

Fix the comment path from SwaggerUI to SwaggerUi since case does matter for template override to work.
2021-08-23 12:06:14 +02:00
Zdeněk Drahoš
1a21f1855e Enable overriding server url for yaml and json export from console 2021-07-29 12:22:54 +02:00
Zdeněk Drahoš
1b9be28ad6 Enable dumping docs to yaml 2021-07-29 11:57:00 +02:00
Zdeněk Drahoš
5124f07ece Enable dumping html docs with cdn and offline assets 2021-06-27 09:24:35 +02:00
Javier Eguiluz
5232463cad
[Doc] Fix some minor RST issues 2021-07-16 17:39:22 +02:00
Javier Eguiluz
d107dc6dd6
[Doc] Fix a minor syntax issue (#1846) 2021-07-09 19:03:13 +02:00
Victor Passapera
730feba2d9 Updates documentation to show a side effect of design decision.
When using serializer context groups in JMS serializer, even if just using the Default group in one place explicitly and leaving it blank in another, they will be treated as different component schemas, even though to the serializer outcome they are the same.

Documenting behavior of decision with side effect.
2021-05-30 21:00:03 -07:00
Alexandru Năstase
9b258b10bb Add extra name_patterns example to areas docs
Add an extra `name_patterns` example to areas docs
2021-05-09 17:25:00 +02:00
Alexandru Năstase
791b0ce15d
Add extra name_patterns example to areas docs
Add an extra `name_patterns` example to areas docs
2021-05-07 16:56:52 +02:00
Guilhem Niot
a7573897fb Merge branch '3.x' 2021-04-23 15:18:59 +02:00
Javier Eguiluz
051fca9070
[Doc] Some minor fixes in index.rst 2021-03-23 20:13:05 +01:00
Baptiste Lafontaine
cc5bc47a0b Add documentation 2020-11-02 11:21:34 +01:00
Guilhem Niot
5b6f128bd0
Update @OA\Parameter usage example (#1706) 2020-08-26 22:30:16 +02:00
vadim2991
5dce5fe1bc
correction an invalid yaml in the documentation (#1703) 2020-08-21 22:39:40 +02:00
Guilhem Niot
0fd910b34a
Update the installation command 2020-07-24 16:57:39 +02:00
Guilhem Niot
35b84d1298
Fix @charliefancelli's report (https://github.com/nelmio/NelmioApiDocBundle/issues/1689) 2020-07-24 15:50:01 +02:00
Guilhem Niot
a82a1c1416
Fix @OA\JsonContent usage in the docs 2020-07-20 20:12:23 +02:00
Guilhem Niot
fa3158ce67 Document the support of OA annotations on methods 2020-07-12 15:21:14 +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
Gripinskiy Sergey
57f8cf4634 Question about @SWG\Tag annotation added to FAQ (#1525) 2019-06-15 15:22:54 +02:00
Serhii Kondratiuk
ccad10aae1 Added name_patterns filter option (#1504) 2019-04-16 17:22:50 +02:00
Aleksandar Dimitrov
f0bc1d3ff4
Fix for missing basePath
If it is used without `#/definitions/` the documentation gives an error: `Could not resolve reference because of: Tried to resolve a relative URL, without having a basePath..`
2019-02-27 16:54:49 +02:00
Olivier Bacs
43c7c0db58
Update index.rst
To reflect Symfony 4's directory and file hierarchy
2019-01-21 23:50:02 +00:00
Quentin Stoeckel
1e9585a415 faq.rst: enhance readability in symfony.com docs (#1420)
It may be a bit less readable on GitHub though.
2018-10-31 16:34:46 +01:00
Quentin Stoeckel
6c6a04bba7 Various documentation enhancements (#1423) 2018-10-31 16:33:06 +01:00
Quentin Stoeckel
48aaca92e3 Fix NelmioApiDocBundle view customization instructions (#1419)
* Fix NelmioApiDocBundle view customization instructions

"Just create a file..." was not OK (missing views/ subdirectory, wrong SwaggerUi case)
The path showcased as code-block's first row was OK

* View customization instructions: remove unnecessary /views/ subdirectory
2018-10-19 20:11:39 +02:00