Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiisoft/demo-api
https://github.com/yiisoft/demo-api
api demo demo-app hacktoberfest internal
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yiisoft/demo-api
- Owner: yiisoft
- License: bsd-3-clause
- Archived: true
- Created: 2020-11-30T07:05:44.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-20T19:10:49.000Z (almost 2 years ago)
- Last Synced: 2024-05-22T16:24:25.323Z (6 months ago)
- Topics: api, demo, demo-app, hacktoberfest, internal
- Language: PHP
- Homepage: https://www.yiiframework.com/
- Size: 342 KB
- Stars: 28
- Watchers: 18
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
This package was closed and moved into https://github.com/yiisoft/demo.
❌---
Yii Framework API Demo Project
[![Latest Stable Version](https://poser.pugx.org/yiisoft/demo-api/v/stable.png)](https://packagist.org/packages/yiisoft/demo-api)
[![Total Downloads](https://poser.pugx.org/yiisoft/demo-api/downloads.png)](https://packagist.org/packages/yiisoft/demo-api)
[![Build status](https://github.com/yiisoft/demo-api/workflows/build/badge.svg)](https://github.com/yiisoft/demo-api/actions?query=workflow%3Abuild)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/yiisoft/demo-api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/yiisoft/demo-api/?branch=master)
[![static analysis](https://github.com/yiisoft/demo-api/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/demo-api/actions?query=workflow%3A%22static+analysis%22)API Demo application for Yii 3.
## Installation
Install docker:
```bash
docker-compose up -d
```Enter into the container:
```bash
docker exec -it yii-php bash
```Install packages:
```bash
composer install
```Change ownership of the app directory to web group:
```bash
chown -R :www-data .
```Usually the application is available at http://localhost:8080.
Authorization is performed via the `X-Api-Key` header.
## API documentation
API documentation is available at `/docs`. It is built from OpenAPI annotations (`@OA`).
See [Swagger-PHP documentation](https://zircote.github.io/swagger-php/Getting-started.html#write-annotations) for details
on how to annotate your code.## Codeception testing
```php
./vendor/bin/codecept run
```## Static analysis
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
```php
./vendor/bin/psalm
```