Skip to content

Releases: onmoon/openapi-server-bundle

Allow installing without minimum stability change

29 Jul 14:30
02e6aeb
Compare
Choose a tag to compare
remove minimum-stability dev requirement (#189)

Co-authored-by: Patrik Foldes <[email protected]>

Fix compatibility with symfony/yaml 7

10 Jun 10:50
ca7388b
Compare
Choose a tag to compare
fix compatibility with symfony 7 (#187)

Co-authored-by: Patrik Foldes <[email protected]>

Symfony 7 support

21 May 15:31
5511ee6
Compare
Choose a tag to compare
  • Added support for Symfony 7
  • Dropped support for Symfony 6.0-6.3

More data added to ResponseEvent

06 May 13:38
75a4422
Compare
Choose a tag to compare

Both RequestHandler and Request objects are now recoverable from the ResponseEvent.

Allow generating custom DateTime classes for date-time fields

23 Dec 09:04
f85a01f
Compare
Choose a tag to compare

You can now specify for each specification what class should be used for serializing and deserializing date and date-time fields in this API

open_api_server:
  specs:
    petstore:
      date_time_class: '\Carbon\CarbonImmutable'

The specified class should be an implementation of \DateTimeInterface

Change generated classes structure to reflect types from specification

04 May 13:24
1aec01f
Compare
Choose a tag to compare

Changelog

  • Generated request and response classes have been completely reworked, to reflect the named types provided in the specification. In general this results in significantly less classes generated, as each type from the specification is now mapped to only one class. Previously there was one class generated per each endpoint that uses a type from the specification.
  • The refresh command has been removed (php bin/console open-api:refresh), use the generate command now instead (php bin/console open-api:generate)

Notes on updating to this version

After updating to this version, add an empty implementation of the new \OnMoon\OpenApiServerBundle\Interfaces\ApiLoader::getAllowedCodes method to your generated ApiServiceLoaderServiceSubscriber class for the first code generation using the new version of the package to work. When you run the generation for the first time it will replace this empty implementation with a working one.

/**
 * This class was automatically generated
 * You should not change it manually as it will be overwritten
 */
class ApiServiceLoaderServiceSubscriber implements ApiLoader
{
    ...

    /** @return string[] */
    public function getAllowedCodes(string $apiClass, string $dtoClass): array
    {
        return [];
    }
}

Add Symfony request object to RequestDtoEvent

16 Nov 10:48
8df21f3
Compare
Choose a tag to compare
  • Added the Symfony request object to RequestDtoEvent

Fix Symfony 6.1 deprecation notices

01 Sep 15:41
785e572
Compare
Choose a tag to compare
Fix deprecation notices (#178)

Co-authored-by: Patrik Foldes <[email protected]>

Changed RequestDtoEvent

01 Sep 14:42
0d9ed5c
Compare
Choose a tag to compare
  • RequestDtoEvent is triggered now even if the current request has no body and therefore no request DTO
  • RequestDtoEvent now contains the request handler class instance too

Replace forked dependencies with upstream

21 Jul 13:20
303688c
Compare
Choose a tag to compare

Replaced forked dependencies with upstream packages for:

  • cebe/php-openapi
  • league/openapi-psr7-validator