Releases: cnizzardini/cakephp-swagger-bake
v1.5.3
Features
- Support multiple APIs in a single project #156
Changes
- Performance optimization #157
Check out the README for instructions on Multiple Instances of Swagger Bake.
Release Notes
v1.5.2
v1.5.1
Adds enumerated type to sort
parameter for SwagPaginator
which displays as dropdowns in SwaggerUI #148
This will show dropdowns in SwaggerUI by default using Paginate.sortableFields
or the associated models Schema. You can configure the enums through annotation or tell SwagPaginator to render that field as a text input only as it use to. See the updated documentation for details: https://github.com/cnizzardini/cakephp-swagger-bake/tree/master/src/Lib/Annotation#swagsearch
v1.5.0
This release adds some additional OpenAPI support including HTTP OPTIONS, HEAD, and PUT. The mimeType annotation attribute was deprecated for SwagRequestBodyContent and SwagResponseSchema in favor of the mimeTypes array attribute. Array of entities are no longer added to #/components/schemas, instead, use the new schemaItems array attribute.
Check out the new expanded documentation for annotations and extensions.
Features
- Add additional support to Path object #112
- Support PUT on edit actions #140
- Adds
schemaItems
annotation toSwagResponseSchema
#125 - Set additional data formats using Validator #88
- Adds support for Validator::lengthBetween #89
- Ability to configure path parameters #138
Changes
- Do not display Array of Objects in OpenApi Schema #119 (see details below)
- SwagRequestBodyContent->mimeType is deprecated, use mimeTypes as an array instead #139
- SwagResponseSchema->mimeType is deprecated, use mimeTypes as an array instead #143
- Upgrades redoc to 2.0.0-rc.31
- Upgrades swagger to 3.30.2
- Operation.operationId format changed from controler:action to controler:action:httpMethod (example actors:index:get)
- As part of #138 path parameters type, format, and description are now dervived from cake models where possible in CRUD operations.
- Paginator
direction
parameter is now an enum withasc
anddesc
options. - Do not add properties to OpenAPI json is value equals default #149
Fixes
- SwagRequestBody(ignoreCakeSchema=true) not working #146
- Resolved potential bugs found by PHPStan #97
- Resolved issues found by PHPCS #92
- Resolved PHPMD issues #108
Misc
- Implemented PHPMD #108
- Implement PHPCS #92
- Fix PHPCS errors and warnings #94
- Add readme to src/Lib/Extension #89
- Implement PHPStan #97
- Add code coverage reporting #99
- Create unit tests for bake theme #90
- Improved code coverage for console commands #110, #111
Details
#119 You can now define an array of entities with SwagResponseSchema
, example:
@Swag\SwagResponseSchema(schemaItems={"$ref"="#/components/schemas/Pet"})
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
As part of this change, arrays of entity will no longer be automatically created and added to #/components/schemas
. For controller:index
Swagger Bake will automatically create OpenApi schema like above.
#139 Use mimeTypes={"application/json"})
instead of mimeType="application/json"
for SwagRequestBodyContent. This is an improvement as you can now include multiple mimetypes in a single annotation.
#143 is a similar change as above for SwagResponseSchema. Use mimeTypes instead of mimeType.
Release Notes:
v1.4.2
This is a maintenance release.
Fixes
- Warning Error: Missing configuration file for config/swagger_bake.php #117
- Improve error message when no restful routes exist #118
- Update comment #121
Release Notes
https://github.com/cnizzardini/cakephp-swagger-bake/milestone/12?closed=1
v1.4.1
Supports CakePHP >= 4.0
v1.4.0
This release adds support for over 30 additional OpenAPI properties in Schema, Schema Property, Path, and Parameter objects. It includes support for parsing your projects Cake Validators to set Schema Property attributes such as minLength, maxLength, and more. Two new annotations, SwagDtoQuery
and SwagDtoForm
, were added to provide additional functionality to Data Transfer Objects.
Read the projects OpenAPI Schema Support Roadmap for a full list of supported specifications.
New Features
- Additional support for OpenAPI Parameter Object specification (#60)
- Add additional functionality to SwagDto (#61)
- New SwagDtoQuery and SwagDtoForm annotations (#70)
- Support various notBlank, notEmpty varients (#74)
- OpenAPI Path spec additions (#59)
- OpenAPI Schema spec additions (#57)
- Upgrade redoc to 2.0.0-rc.30 (#80)
- Upgrade swaggerui to 3.27.0 (#80)
Fixes
- Required fields should be derived from isPresenceRequired not isEmptyAllowed (#72)
- Default response mimeType to first item in swagger_bake.php config (#73)
- XML example cannot be generated; root element name is undefined (#82)
Misc
v1.3.0
New Features
- Schema responses defined via SwagResponseSchema will now default to the first mimeType in SwaggerBake.responseContentTypes if no mimeType was defined in the annotation. If no responseContentTypes are defined, application/json is assumed.
- Support OpenAPI Schema: oneOf, anyOf, and allOf #37
- RESTful controllers can now be baked with
bin/cake bake {Name} --template SwaggerBake
#36 - Support AuthenticationComponent #38
- Support Schema:enum #39
- Support descriptions on
@throw
tags #44 - Feature Request: Override default tag attribute #42
- Added a SwaggerUiComponent, which now makes building a userland SwaggerController much easier.
- Upgraded redoc to
2.0.0-rc.29
from2.0.0-rc.28
- Upgraded swagger-ui to
3.25.4
from3.25.1
Fixes
- Fixed bug with rendering warnings via FlashComponent #52
- Controller::delete methods now default to HTTP 204 responses #51
- Response codes are strings - not integers - in OpenAPI 3.0 spec. Deprecate
@SwagResponseSchema(httpCode=integer)
in favor of@SwagResponseSchema(statusCode="string")
#40 - Resolving potential security issue #46
Thanks @bmudda for contributions and bug reports.
v1.2.0
Enhancements
- Support friendsofcake/search
- New extension system to add functionality without modifying core code
- Various code cleanup and minor refactors
Bug Fixes
- Redoc 2.0.0-rc.28 t.required.indexOf is not a function #30
v1.1.1
Removes debug code that was accidentally left in