lichunqiang / yii2-swagger

yii2 with swagger-php
https://packagist.org/packages/light/yii2-swagger
MIT License
151 stars 47 forks source link

The package is not available in a stable-enough version according to your minimum-stability setting #5

Closed urfusion closed 7 years ago

urfusion commented 7 years ago

I am getting below error even I have updated my composer

The package is not available in a stable-enough version according to your minimum-stability setting

composer

"minimum-stability": "dev"
urfusion commented 7 years ago

screenshot_1

lichunqiang commented 7 years ago

Can i get you fxp/composer-asset-plugin version? Is over v1.2.2?

You can refer the demo project: https://github.com/lichunqiang/yii2-swagger-demo/blob/master/composer.json#L26

either minimum-stability use stable for light/yii2-swagger=~1.0.4 or dev for light/yii2-swagger=*@dev is passed

Slauta commented 7 years ago

@urfusion Hi, I solved this problem. Install fxp/composer-asset-plugin: php composer.phar require fxp/composer-asset-plugin --dev

urfusion commented 7 years ago
- light/yii2-swagger 1.0.4 requires bower-asset/swagger-ui 2.2.10 -> no matc

hing package found.

lichunqiang commented 7 years ago

@urfusion u can try the demo project. It works fine and no your mentioned issue..

urfusion commented 7 years ago

I am trying the demo. but getting error

http://localhost/yii2-swagger-demo-master/v1/users?access_token=Bearer%204p9mj82PTl1BWSya7bfpU_Nm8u07hkcB

I have installed it in a folder inside htdocs

lichunqiang commented 7 years ago

@urfusion you can just run `yii serve to start a internal server. BTW, what's the error?

urfusion commented 7 years ago

screenshot_12

urfusion commented 7 years ago

Is there any other way to run. Because when I built front end and backend with it its not possible to run yii server each time.

lichunqiang commented 7 years ago

You should configure web directory as http server's root path.

As apache:

<VirtualHost *:80>
    ServerName www.mysite.com
    DocumentRoot d:/wamp/www/demo/frontend/web
</VirtualHost>

then modify the windows host file, configure www.mysite.com 127.0.0.1 for example. Finally, you can asscess www.mysite.com to view the project.

urfusion commented 7 years ago

{"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://www.swagger.local/site/api"}]}

lichunqiang commented 7 years ago

@urfusion You should ingore this. This behaivor is to valid your schema from remote, but the project is deployed locally, so the swagger remote check server can not access to it.