Alexey Alshenetsky
14383f4ee5
Add support for zircore/swagger-php 4.0 ( #1916 )
...
* add zircore/swagger-php v4 to composer.json
* fix incompatibilities
* add compatibility with 3.2
* Apply fixes from StyleCI
* mark SetsContextTrait as internal
* Bump php version
Co-authored-by: Alexey <alshenestky@icloud.com>
Co-authored-by: Alexey Alshenetsky <alshenetsky@users.noreply.github.com>
Co-authored-by: Guilhem Niot <guilhem@gniot.fr>
2021-12-11 14:39:04 +01:00
Guilhem Niot
a184cb8ef4
Fix deprecations ( #1923 )
2021-12-11 14:19:43 +01:00
Vladislav
d59dbbd859
Issue 1848 operation id by route name ( #1907 )
...
* Fix #1885 update psr/log and psr/container
* Issue #1848 operation id by route name
Co-authored-by: Vlad Gaiduk <uahaiduk@gmail.com>
2021-11-22 20:18:16 +01:00
Asmir Mustafic
0bcdc59b88
add missing typehint
2021-08-16 15:19:26 +02:00
Asmir Mustafic
497afa1361
improve testing by checking explicitly that collisions are not generated
2021-08-16 13:11:59 +02:00
Guilhem Niot
be014ff11b
Merge pull request #1830 from nelmio/ADDPROP
...
Fix additionalProperties support
2021-08-03 09:35:12 +02:00
Alexander Melihov
2df454c0c3
Compound validation rule support ( #1818 )
...
* Compound validation rule support
* Compound validation rule support
* Compound validation rule support
* Compound validation rule support
* Remove duplicated method
* error during merge
* wrong variable name
* Simplify PR
* Fix CS
* Use same indentation as before
Co-authored-by: Guilhem Niot <guilhem@gniot.fr>
Co-authored-by: Guilhem Niot <guilhem.niot@gmail.com>
2021-06-16 09:59:06 +02:00
Guilhem Niot
ee00f02a48
Fix additionalProperties support
2021-06-07 19:23:02 +02:00
Guilhem Niot
d8a7859484
Explictly enable property access in the tests (related to https://github.com/symfony/symfony/pull/40140 , it is a dev dependency)
2021-06-07 19:04:16 +02:00
Guilhem Niot
bf77277f2f
Merge pull request #1788 from raziel057/patch-1
...
Fix Open API doc for DateTime requirements
2021-03-26 22:54:00 +01:00
tlallement
0e7ebe5650
Small fixes for RFC3339 and new assertion
2021-03-24 18:01:32 +01:00
Thomas Lallement
a72588861f
Add support for 'c' format
2021-03-16 11:05:00 +01:00
Thomas Lallement
73ad2e3cdf
Fix property naming
2021-03-16 10:42:37 +01:00
Thomas Lallement
7f9b00d620
Code improvements and add unit test
2021-03-16 10:40:12 +01:00
Javier Spagnoletti
64952d155c
Remove old useless configurations from tests
2021-03-12 00:01:22 -03:00
Christopher Davis
883d7b6c89
Apply enum
from Choice Constraints to Items When Choice is Multiple ( #1784 )
...
* 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>
2021-02-19 09:41:32 +01:00
Guilhem Niot
d074e05436
Merge pull request #1777 from saleh199/add_yaml_doc
...
Add Yaml Documentation
2021-02-16 01:01:33 +01:00
Guilhem Niot
1b4437d88a
Merge pull request #1776 from chrisguitarguy/discriminator_field
...
Support Polymorphism via the Symfony Discriminator Map
2021-02-08 22:46:49 +01:00
Saleh Saeed
2b387e80f2
Fix styleci
2021-02-01 23:34:02 +01:00
Saleh Saeed
46ef005787
Add Yaml Documentation
...
Fixes #1613
2021-02-01 23:29:53 +01:00
Christopher Davis
9299c0e52e
Support OpenAPI Polymorphism in ObjectModelDescriber
...
This is the default "symfony support" class, so seems like the right
place.
2021-02-01 08:56:31 -06:00
Paul des Garets
eeb0b4efba
Support oauth2 scopes in Security annotation
2021-01-26 19:08:53 +01:00
Guilhem Niot
42365c71cc
Fix a regression about manual paths in operation no longer being taken into account
2020-12-27 19:14:14 +01:00
Guilhem Niot
ba3fe1cdfa
Merge branch '3.x'
2020-12-17 00:06:17 +01:00
Guilhem Niot
3895e17fe4
Fix exposure of private/protected methods
2020-12-16 23:46:29 +01:00
Guilhem Niot
909a7934b4
Merge branch '3.x'
2020-12-10 22:31:55 +01:00
Guilhem Niot
0a3785fd26
Fix cs
2020-12-10 22:30:50 +01:00
Guilhem Niot
363fd26f7c
Merge branch '3.x'
2020-12-10 22:28:55 +01:00
Guilhem Niot
6d995a6e03
Add php 8 support ( #1745 )
...
* Add php 8 support
* Ignore platform reqs
* Change php constraint
* Use vendor/bin/simple-phpunit directly
* Remove willdurand/hateoas-bundle when testing php8
* Merge 3.x
* Move to github actions
* Fix the tests
* Change ./phpunit permissions
* Update deprecations policy
2020-12-10 21:59:36 +01:00
Guilhem Niot
90f835f1ef
Allow to not document form types fields ( #1752 )
...
* Allow the usage of `@SWG\Definition` on form types
* Allow to not document form types fields
* Reduce the number of changes
2020-12-02 15:38:38 +01:00
Guilhem Niot
a01fd1e4f0
Fix error
2020-11-28 16:11:05 +01:00
Guilhem Niot
68bf1670f3
Fix CS
2020-11-20 17:10:21 +01:00
Guilhem Niot
0912c85a0d
Improve error when the items type of an array is not specified
2020-11-20 17:06:56 +01:00
Guilhem Niot
e9914097f7
Merge pull request #1740 from nelmio/refparams
...
Fix the detection of references in the RouteMetadataDescriber
2020-11-03 10:32:13 +01:00
Guilhem Niot
412eff9805
Test the support of QueryParam::$map
2020-11-03 10:29:37 +01:00
Guilhem Niot
e1700ba4b5
Fix the detection of references in the RouteMetadataDescriber
2020-11-01 11:41:49 +01:00
Lucas dos Santos Abreu
b022f6b219
(feat): add utf-8 charset to response
...
`swagger-ui-bundle` is very sensible to encoding changes because of the
RegExp performed.
ensuring UTF-8 on the response prevents end-user config to break it.
the annotations already needs to be UTF-8 compatible to generate the
JSON, so it should not break users applications.
2020-10-02 14:04:16 -03:00
Guilhem Niot
4436c468f1
Fix the tests broken by zircote/swagger-php
2020-09-27 22:20:04 +02:00
Guilhem Niot
c1903db109
Fix the JMSModelDescriber
2020-09-09 08:38:25 +02:00
Paul Dugas
429d809f41
Ignore ReflectionException for "magic" JMS\Accessor methods ( #1715 )
...
* Update JMSModelDescriber.php
Ignore ReflectionException thrown when getter or setter from JMS\ Accessor are "magic" methods.
* Add tests to avoid future regressions
* CS
Co-authored-by: Guilhem Niot <guilhem.niot@gmail.com>
2020-09-09 08:38:08 +02:00
Guilhem Niot
5b6983e179
Fix the JMSModelDescriber
2020-09-09 08:35:01 +02:00
Paul Dugas
fcb52246b2
Ignore ReflectionException for "magic" JMS\Accessor methods ( #1715 )
...
* Update JMSModelDescriber.php
Ignore ReflectionException thrown when getter or setter from JMS\ Accessor are "magic" methods.
* Add tests to avoid future regressions
* CS
Co-authored-by: Guilhem Niot <guilhem.niot@gmail.com>
2020-09-09 08:27:47 +02:00
Pavel Stejskal
a4c4ffcf3b
Fix incorrect media types ( #1712 )
2020-09-01 16:42:55 +02:00
Guilhem Niot
282724580c
Fix a wrong use of operation->security ( #1700 )
2020-08-11 16:44:43 +02:00
Guilhem Niot
eeb4a8b90e
Fix ServerVariable management ( #1694 )
...
* Fix ServerVariable management
* Fix cs
* Apply StyleCI fixes
2020-08-11 16:44:05 +02:00
Guilhem Niot
23fdbf0412
Merge branch '3.x'
2020-08-06 10:29:17 +02:00
Guilhem Niot
edf6b70175
Apply StyleCI fixes
2020-08-06 10:26:59 +02:00
Filip Benčo
9592c7ebfa
Fix nullable array properties ( #1697 )
...
* Fix nullable array properties
* Fix tests & Remove weird leftover dump
* Fix test
Co-authored-by: Filip Benčo <filip.benco@websupport.sk>
2020-08-06 10:22:59 +02:00
Guilhem Niot
69df4c38b5
Disable the OperationId processor ( #1685 )
...
* Disable the OperationId processor
* Fix CS
* CS
2020-07-24 08:37:58 +02:00
Guilhem Niot
9de23eb4a5
Merge '3.x'
2020-07-18 13:37:58 +02:00