Skip to content

Commit

Permalink
autoconfigure is needed for routing.route_loader tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobion committed May 31, 2020
1 parent 7e39d65 commit 3bf990e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Loads routes in Symfony based on [OpenAPI/Swagger annotations](https://github.com/zircote/swagger-php).

![CI](https://github.com/Tobion/OpenAPI-Symfony-Routing/workflows/CI/badge.svg)
[![CI](https://github.com/Tobion/OpenAPI-Symfony-Routing/workflows/CI/badge.svg)](https://github.com/Tobion/OpenAPI-Symfony-Routing/actions)

## Installation

Expand Down Expand Up @@ -42,10 +42,8 @@ This library provides an `OpenApiRouteLoader` that you need to define as service
```yaml
# config/services.yaml
services:
_defaults:
autoconfigure: true

Tobion\OpenApiSymfonyRouting\OpenApiRouteLoader:
autoconfigure: true
# Looks for OpenAPI/Swagger annotations in the symfony flex default "src" directory
factory: [Tobion\OpenApiSymfonyRouting\OpenApiRouteLoader, fromSrcDirectory]
```
Expand All @@ -66,6 +64,7 @@ openapi_routes:
```yaml
services:
Tobion\OpenApiSymfonyRouting\OpenApiRouteLoader:
autoconfigure: true
factory: [Tobion\OpenApiSymfonyRouting\OpenApiRouteLoader, fromDirectories]
arguments:
- '%kernel.project_dir%/src'
Expand Down

0 comments on commit 3bf990e

Please sign in to comment.