activelamp / swagger-ui-bundle

Creates a Swagger UI page in your Symfony2 application
26 stars 21 forks source link

[BROKEN] auth_config is not recognized by the plugin anymore #8

Open sebastienvermeille opened 9 years ago

sebastienvermeille commented 9 years ago

Hello, I tryed your plugin and I have got an error :

InvalidConfigurationException in ArrayNode.php line 309: Unrecognized option "auth_config" under "al_swagger_ui"

I followed each steps and tried to use : al_swagger_ui: resource_list: http://path auth_config: http: enable: true key_name: token delivery: header

Any idea about how can I solve that ?

bezhermoso commented 9 years ago

Hi @sebastienvermeille

Do you mind showing me the contents of your composer.json file?

sebastienvermeille commented 9 years ago

Hello @bezhermoso yes sure sorry :

''''json "require": { "php": ">=5.3.9", "symfony/symfony": "2.7.*", "doctrine/orm": "^2.4.8", "doctrine/doctrine-bundle": "~1.4", "symfony/assetic-bundle": "~2.3", "symfony/swiftmailer-bundle": "~2.3", "symfony/monolog-bundle": "~2.4", "sensio/distribution-bundle": "~4.0", "sensio/framework-extra-bundle": "^3.0.2", "incenteev/composer-parameter-handler": "~2.0", "friendsofsymfony/rest-bundle": "^1.7", "jms/serializer-bundle": "^1.0", "nelmio/api-doc-bundle": "^2.9", "lexik/jwt-authentication-bundle": "^1.2", "friendsofsymfony/user-bundle": "~2.0@dev", "activelamp/swagger-ui-bundle": "^0.1.2" }, "require-dev": { "sensio/generator-bundle": "~2.3" }, ''''

I will not be able to test it again I had to swap for a java rest api server for now... but it was working without auth_config:

bezhermoso commented 9 years ago

Thanks! Looks like this would fix this for you: you are using Swagger 1.x? If so you should use authentication instead of auth_config. If however you are using Swagger 2.0, keep auth_config but use dev-master in your composer.json file.

bezhermoso commented 8 years ago

@sebastienvermeille Did you get it to work?