Commit Graph

64 Commits

Author SHA1 Message Date
Martin Rademacher 2357fafbb0
Add validation rule that example/examples are mutually exclusive and add examples property to Schema (3.1.0 only) (#1561) 2024-03-23 19:35:46 +13:00
Martin Rademacher 423808fcf6
Docs codeblock (#1533) 2024-01-19 10:51:32 +13:00
Martin Rademacher 364fd85dee
Make doctrine/annotations optional (#1508) 2023-12-01 14:40:33 +13:00
Martin Rademacher 3f98e8fb2d
Add Contributing.md (#1412) 2023-02-13 14:40:06 +13:00
Martin Rademacher 80399cf906
Allow and support doctrine/annotations ^2.0 (#1375) 2023-01-04 08:53:10 +13:00
Martin Rademacher b6769796e6
Raise deprecation warning for `Context::detect` (#1334)
* Raise deprecation warning for `Context::detect`

* .
2022-10-28 16:16:11 +13:00
Martin Rademacher 9a8b96077d
Add script to auto-generate processor docs (#1332) 2022-10-21 10:12:45 +13:00
Martin Rademacher 4f63dcbdd2
Consistently use OA and OAT as relative namespace for annotations/attributes (#1314) 2022-09-19 16:47:43 +12:00
Martin Rademacher ba59b04ba2
Refresh reference docs and disable xdebug on CL (#1312) 2022-09-16 08:50:50 +12:00
Martin Rademacher eccd81b99e
Dep updates (#1289)
* CS update following latest php-cs-fixer rule changes
* Drop AllowDynamicProperties error
* Fix psr/log deps
2022-07-15 20:13:10 +12:00
Martin Rademacher fb967b3ef9
Fix type-hint issues around annotation/attribute Schema classes (#1251)
Attributes that inherit from `Annotations\Schema` typically do so by extending from their corresponding annotations. That means they do not have `Attributes\Schema` in their ancestor list.
2022-05-29 18:22:07 +12:00
Martin Rademacher 46c3e4c493
Dev tools (#1243)
* Add .gitattributes and .editorconfig
* Add basic fixer to ensure we have a @license docblock
* Add missing dev autoload config
2022-05-20 16:17:19 +12:00
Martin Rademacher 117caa0c0c
Docs codeblocks (#1232)
Add custom theme code to add annotations/attributes tabs to code examples.
2022-05-19 12:13:01 +12:00
Martin Rademacher 86e24665ba
Add Psalm to analysis chain (#1223) 2022-05-04 11:32:59 +12:00
Martin Rademacher f0b3b8d23d
Add PHPStan workflow and baseline (#1222) 2022-05-04 09:57:50 +12:00
Martin Rademacher 2f66ec81d2
Allow to annotate class constants as properties (#1193) 2022-04-12 17:49:55 +12:00
Martin Rademacher 73a9d6bbd2
Fix annotations/attributes links (#1118) 2022-02-11 16:30:34 +13:00
Martin Rademacher a3bfbf2dc5
Fix example YAML validation warnings (#1114) 2022-02-11 13:12:30 +13:00
Martin Rademacher ccbe574273
Refactor documentation and add gh-pages workflow (#1084)
Here goes...
2022-02-04 15:54:48 +13:00
Martin Rademacher 03ebfa788a
Add basic enum support (#1050)
Will create valid schema components for Enums annotated with `@OA\Schema`
2022-01-10 09:07:43 +13:00
Martin Rademacher faafa3535c
Rationalise attribute parameters for types that inherit from Schema (#1037)
Also clean up a few things we've missed during the annotation/attribute split.
2021-12-23 14:28:48 +13:00
Bob Fanger c4b6729e58
feat: openapi: 3.1.0 summary and description fields for refs (#1030)
* feat: openapi: 3.1.0  summary and description fields for refs
* Drop swagger-cli validation

Co-authored-by: Bob Fanger <b.fanger@wearetriple.com>
Co-authored-by: DerManoMann <mano@radebatz.net>
2021-12-23 08:31:24 +13:00
Martin Rademacher 8cb54ead2b
Allow composer/package-versions-deprecated updates (#1015) 2021-12-07 10:00:17 +13:00
Gemorroj f754f85884
add psr/log 2.0 and 3.0 (#1008) 2021-12-05 11:34:47 +13:00
Martin Rademacher dd5f1b7b84
PHP 8.1 attributes (#982)
* PHP 8.1 support
* Annotations can be used as PHP attributes
* New annotation `PathParameter` added
* Removal of deprecated static properties used to configure the underlying Doctrine annotations parser
* New annotation `Attachable` to allow to attach any data to annotations/attributes without affecting the generated spec
2021-11-28 13:58:14 +13:00
Martin Rademacher 8dece41637
Fix composer --no-dev dependencies (#986) 2021-09-20 10:05:52 +12:00
Martin Rademacher 3b00b38e1e
Add package deprecated checker (#978)
* Add composerpackage-versions-deprecated dev dependency
* Fix fixtures namespace
2021-08-12 15:27:41 +12:00
Martin Rademacher 41ed0eb1da
Fix use of "$refs" (#959)
Also adds `swagger-cli` as second validator for example specs.
2021-06-25 16:08:57 +12:00
Martin Rademacher b57e4971d3
Upgrade to PHP cs-fixer 3.0 (#956)
Includes formatting changes related to cs-fixer/ruleset upgrades as well as new type hints to help static analysis.

Fixes issue with missing import of `OpenApi\Generator' while using `Generated::UNDEFIED`!
2021-06-24 10:35:01 +12:00
Martin Rademacher 4dbcefe962
Document validation of generated Example specs (#898)
Adds a composer `scripts` target to run `spectral` over all generated specs files in the `Examples` folder
2021-01-08 11:11:48 +13:00
DerManoMann 3cfd60acf4 Codestyle cleanup
* add more type hints
* remove redundant phpdoc
* fix some more phpstan/psalm issues
2020-10-23 09:59:08 +13:00
DerManoMann 76cf560760 Bump doctrine deps and cleanup some cruft
Bump doctrine dependency to 1.7 to make things work in 7.3/7.4 even with
the lowest possible dependencies (`composer --prefer-lowest`)
2020-09-18 17:51:22 +12:00
DerManoMann 78a2ef24aa Typehint and phpdoc improvements based on phpstan
Fix low hanging fruit from running phpstan with level 2 checking.
Also adds a basic psalm config and a new composer run-script target
('analyse') to execute both tools.

Tool dependencies are intentially not added to avoid unnecessary bloat
and download time in travis.

This is intended as a purely manual tool for regression checking and a
help to iteratively improve the codebase.
2020-09-07 15:18:08 +12:00
Bob Fanger 83a224126c doc: Updated vuepress to use local version 2020-09-05 09:59:11 +02:00
Bob Fanger 9d172471e5 doc: Updated maintainers 2020-09-03 22:18:43 +02:00
DerManoMann 3f1cee99ba Switch code style checks to php-cs-fixer
A bunch of code style related updates:
* Clean up namespaces in tests and fixtures + a couple other minor
things that PHPStorm doesn't like.
* Drop dev dependency for laminas packages; these were used to have some
3rd party annotations only and got replaced with a fixture annotation
instead.
2020-07-24 09:45:43 +12:00
DerManoMann 27b44542db Upgrade from abandoned zendframewok to laminas
Upgrade the test for 3rd party annotation support from the abandoned
zendframework to the successor laminas project.
2020-05-30 12:14:07 +02:00
DerManoMann a33d79c9b8 Add missing use statements to MergeXmlContent
Adds missing use statements and corresponding test(s).
Also adds `ext-json` as requirement to `composer.json`.
2020-05-14 08:09:13 +02:00
Bob Fanger 7fde13ef9a Automate rebuilding documentation site
Makes preparing the gh-pages branch easier/faster.
#687 ;)
2019-06-16 17:57:40 +02:00
Bob Fanger 29e913a345 Upgraded to PHPUnit 8 (and dropped support for outdated php versions) 2019-02-03 21:34:32 +01:00
Bob Fanger 9e8aeca061 Added Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE flag
Fixes #591
2018-10-12 13:59:29 +02:00
Bob Fanger be3f04c751 Switched to yaml as default output
This matches the openapi v3 documentation

#315
2018-08-11 18:38:21 +02:00
Bob Fanger 531d7cb038 Formatted source
(Fix Travis build)
2018-08-11 16:33:37 +02:00
Bob Fanger 33c50b900d Improved documentation (website) 2018-08-02 22:12:45 +02:00
Bob Fanger 9baab65350 Renames, $ref validation, removed hhvm and
- More swagger  to openapi renaming
- Fixed ref validation
- Removed hhvm from travis
2018-06-29 18:01:28 +02:00
Bob Fanger 1504d4e716 OAS to OA and more swagger to openapi renaming
Renamed the Swagger namespace to OpenApi
Renamed bin/swagger  to bin/openapi
Renamed `@OAS\` shorthand to `@OA\`
2018-06-29 13:03:31 +02:00
Sergii Donii 0a5419d4bf merge master 2018-06-20 10:56:55 +03:00
Gabriel Caruso 8bb17cfc31 Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-24 10:13:13 +01:00
Vytautas Stankus 8a24664325 Does not work with symfony/finder lower than 2.2 version
```
1) SwaggerMiddlewareTest\GeneratorTest::testCanGenerate
LogicException: You must call the in() method before iterating over a Finder.

/home/svycka/Documents/projects/github/swagger-middleware/vendor/symfony/finder/Symfony/Component/Finder/Finder.php:518
/home/svycka/Documents/projects/github/swagger-middleware/vendor/zircote/swagger-php/src/functions.php:39
```
2017-10-20 12:22:00 +02:00
Bob Fanger 3151643dda Updated the OpenApi annotation and implemented automatic merging into Components
- Minimum PHP version 7 (which was released dec 2015, it's time)
- Upgraded tests to use PHPUnit to v6.3
- Added strict_types
- Merged patches from master

Notify #384
2017-08-12 02:28:33 +02:00