Skip to content

Latest commit

 

History

History
178 lines (149 loc) · 4.74 KB

CHANGELOG.md

File metadata and controls

178 lines (149 loc) · 4.74 KB

CHANGELOG

4.23.0

  • Cache configuration option nelmio_api_doc.cache.item_id now automatically gets the area appended.
    nelmio_api_doc:
        cache:
            pool: app.cache
            item_id: nelmio_api_doc.docs
        areas:
            default: 
                ...
            area1:   
                ...
    Result in cache keys: nelmio_api_doc.docs.default & nelmio_api_doc.docs.area1 to be used respectively.
  • Added cache configuration option per area.
    nelmio_api_doc:
        areas:
            default: # Manual cache configuration
                cache:
                    pool: app.cache
                    item_id: nelmio_api_doc.docs.default
                ...
            area1:   
                cache:
                    pool: app.cache
                    item_id: nelmio_api_doc.docs.area1
                ...
    Non-configured options will be inherited from nelmio_api_doc.cache.
  • Fixed vendor extensions (x-*) from configuration not being outputted in the generated specification.
    nelmio_api_doc:
        documentation:
            info:
                title: 'My API'
                description: 'My API description'
                x-foo: 'bar'
    Now results in JSON specification:
    {
      ...
      "info": {
        "title": "API",
        "version": "1.0",
        "x-foo": "bar"
      },
      ...
    }
  • Updated nullable enum handling to align with the behaviour of other object types. It now uses wraps nullable enums with oneOf instead of allOf.

4.22.0

4.21.0

  • Added bundle configuration options nelmio_api_doc.cache.pool and nelmio_api_doc.cache.item_id.
    nelmio_api_doc:
        cache:
            pool: app.cache
            item_id: nelmio_api_doc.docs

4.20.0

4.0.0

  • Added support of OpenAPI 3.0. The internals were completely reworked and this version introduces BC breaks.

3.7.0

  • Added @SerializedName annotation support and name converters when using Symfony >= 4.2.
  • Removed pattern added from the Expression Violation message.
  • Added FOSRestBundle 3.x support
  • Added @SWG annotations support at methods level in models

3.3.0

3.2.0 (2018-03-24)

  • Add a documentation form extension. Use the documentation option to define how a form field is documented.

  • Allow references to config definitions in controllers.

  • Using @Model implicitely in @SWG\Schema, @SWG\Items and @SWG\Property is deprecated. Use ref=@Model() instead.

    Before:

    /**
     * This was considered as an array of models.
     *
     * @SWG\Property(@Model(type=FooClass::class))
     */

    After:

    /**
     * For an individual object:
     * @SWG\Property(ref=@Model(type=FooClass::class))
     *
     * For an array:
     * @SWG\Property(type="array", @SWG\Items(ref=@Model(type=FooClass::class)))
     */

Config

  • nelmio_api_doc.areas added support to filter by host patterns.

    nelmio_api_doc:
        areas: [ host_patterns: [ ^api\. ] ]
  • Added dependency for "symfony/options-resolver:^3.4.4|^4.0"

3.1.0 (2018-01-28)

  • Added Symfony Validator constraints support

Symfony Forms

  • Support for boolean checkbox
  • Support for integer

JMS Serializer

  • Support JMS int (alias for integer)
  • Also process phpdoc annotations

SwaggerPHP

  • Handle enum and default properties from SwaggerPHP annotation
  • Support @Security annotations

Config

  • nelmio_api_doc.routes has been replaced by nelmio_api_doc.areas. Please update your config accordingly.

    Before:

    nelmio_api_doc:
        routes: [ path_patterns: [ /api ] ]

    After:

    nelmio_api_doc:
        areas: [ path_patterns: [ /api ] ]

3.0.0 (2017-12-10)

Large refactoring introducing zircote/swagger-php for swagger annotations.

See UPGRADE-3.0.md for upgrading instructions.