diff --git a/api/.github/CONTRIBUTING.md b/api/.github/CONTRIBUTING.md deleted file mode 100755 index e72b180..0000000 --- a/api/.github/CONTRIBUTING.md +++ /dev/null @@ -1,102 +0,0 @@ -# Contributing to API Platform - -First, thank you for contributing, you're awesome! - -To have your code integrated in the API Platform project, there are some rules to follow, but don't panic, it's easy! - -## Reporting Bugs - -If you happen to find a bug, we kindly request you to report it. However, before submitting it, please: - - * Check the [project documentation available online](https://api-platform.com/docs/) - -Then, if it appears that it's a real bug, you may report it using Github by following these 3 points: - - * Check if the bug is not already reported! - * A clear title to resume the issue - * A description of the workflow needed to reproduce the bug, - -> _NOTE:_ Don’t hesitate to give as much information as you can (OS, PHP version extensions...) - -## Pull Requests - -### Writing a Pull Request - -You should base your changes on the `main` branch. - -### Matching Coding Standards - -The API Platform project follows [Symfony coding standards](https://symfony.com/doc/current/contributing/code/standards.html). -But don't worry, you can fix CS issues automatically using the [PHP CS Fixer](http://cs.sensiolabs.org/) tool: - -```bash -php-cs-fixer.phar fix -``` - -And then, add fixed file to your commit before push. -Be sure to add only **your modified files**. If another files are fixed by cs tools, just revert it before commit. - -### Sending a Pull Request - -When you send a PR, just make sure that: - -* You add valid test cases. -* Tests are green. -* You make a PR on the related documentation in the [api-platform/docs](https://github.com/api-platform/docs) repository. -* You make the PR on the same branch you based your changes on. If you see commits - that you did not make in your PR, you're doing it wrong. -* Also don't forget to add a comment when you update a PR with a ping to [the maintainers](https://github.com/orgs/api-platform/people), - so he/she will get a notification. -* Squash your commits into one commit. (see the next chapter) - -Fill in the following header from the pull request template: - -```markdown -| Q | A -| ------------- | --- -| Bug fix? | yes/no -| New feature? | yes/no -| BC breaks? | no -| Deprecations? | no -| Tests pass? | yes -| Fixed tickets | #1234, #5678 -| License | MIT -| Doc PR | api-platform/docs#1234 -``` - -## Squash your Commits - -If you have 3 commits. So start with: - -```bash -git rebase -i HEAD~3 -``` - -An editor will be opened with your 3 commits, all prefixed by `pick`. - -Replace all `pick` prefixes by `fixup` (or `f`) **except the first commit** of the list. - -Save and quit the editor. - -After that, all your commits where squashed into the first one and the commit message of the first commit. - -If you would like to rename your commit message type: - -```bash -git commit --amend -``` - -Now force push to update your PR: - -```bash -git push --force -``` - -# License and Copyright Attribution - -When you open a Pull Request to the API Platform project, you agree to license your code under the [MIT license](../LICENSE) -and to transfer the copyright on the submitted code to [Kévin Dunglas](https://github.com/dunglas). - -Be sure to you have the right to do that (if you are a professional, ask your company)! - -If you include code from another project, please mention it in the Pull Request description and credit the original author. diff --git a/api/.github/workflows/ci.yml b/api/.github/workflows/ci.yml deleted file mode 100644 index 637a479..0000000 --- a/api/.github/workflows/ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: ~ - workflow_dispatch: ~ - -jobs: - tests: - name: Tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Pull images - run: docker compose pull --ignore-pull-failures || true - - name: Start services - run: docker compose up --build -d - - name: Wait for services - run: | - while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker compose ps -q php)")"; do - case $status in - starting) sleep 1;; - healthy) exit 0;; - unhealthy) - docker compose ps - docker compose logs - exit 1 - ;; - esac - done - exit 1 - - name: Check HTTP reachability - run: curl -v -o /dev/null http://localhost - - name: Check API reachability - run: curl -vk -o /dev/null https://localhost - - name: Check PWA reachability - run: "curl -vk -o /dev/null -H 'Accept: text/html' https://localhost" - - name: Create test database - run: | - docker compose exec -T php bin/console -e test doctrine:database:create - docker compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction - - name: PHPUnit - run: docker compose exec -T php bin/phpunit - - name: Doctrine Schema Validator - run: docker compose exec -T php bin/console doctrine:schema:validate --skip-sync diff --git a/api/README.md b/api/README.md index d57be8f..e70cca6 100644 --- a/api/README.md +++ b/api/README.md @@ -1,50 +1,15 @@ -

API Platform

+# API -API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility -and flexibility: +## Setup -* Design your own data model as plain old PHP classes or [**import an existing ontology**](https://api-platform.com/docs/schema-generator). -* **Expose in minutes a hypermedia REST or a GraphQL API** with pagination, data validation, access control, relation embedding, - filters and error handling... -* Benefit from Content Negotiation: [GraphQL](https://api-platform.com/docs/core/graphql/), [JSON-LD](https://json-ld.org), [Hydra](https://hydra-cg.com), - [HAL](https://github.com/mikekelly/hal_specification/blob/master/hal_specification.md), [JSON:API](https://jsonapi.org/), [YAML](https://yaml.org/), [JSON](https://www.json.org/), [XML](https://www.w3.org/XML/) and [CSV](https://www.ietf.org/rfc/rfc4180.txt) are supported out of the box. -* Enjoy the **beautiful automatically generated API documentation** ([OpenAPI](https://api-platform.com/docs/core/openapi/)). -* Add [**a convenient Material Design administration interface**](https://api-platform.com/docs/admin) built with [React](https://reactjs.org/) - without writing a line of code. -* **Scaffold fully functional Progressive-Web-Apps and mobile apps** built with [Next.js](https://api-platform.com/docs/client-generator/nextjs/) (React), -[Nuxt.js](https://api-platform.com/docs/client-generator/nuxtjs/) (Vue.js) or [React Native](https://api-platform.com/docs/client-generator/react-native/) -thanks to [the client generator](https://api-platform.com/docs/client-generator/) (a Vue.js generator is also available). -* Install a development environment and deploy your project in production using **[Docker](https://api-platform.com/docs/distribution)** -and [Kubernetes](https://api-platform.com/docs/deployment/kubernetes). -* Easily add **[OAuth](https://oauth.net/) authentication**. -* Create specs and tests with **[a developer friendly API testing tool](https://api-platform.com/docs/distribution/testing/)**. +### Requirements -[![GitHub Actions](https://github.com/api-platform/core/workflows/CI/badge.svg)](https://github.com/api-platform/core/actions?workflow=CI) -[![Codecov](https://codecov.io/gh/api-platform/core/branch/master/graph/badge.svg)](https://codecov.io/gh/api-platform/core/branch/master) +- docker +- docker-compose -The official project documentation is available **[on the API Platform website](https://api-platform.com)**. +### Installation -API Platform embraces open web standards and the -[Linked Data](https://www.w3.org/standards/semanticweb/data) movement. Your API will automatically expose structured data. -It means that your API Platform application is usable **out of the box** with technologies of -the semantic web. - -It also means that **your SEO will be improved** because **[Google leverages these formats](https://developers.google.com/search/docs/guides/intro-structured-data)**. - -Last but not least, the server component of API Platform is built on top of the [Symfony](https://symfony.com) framework, -while client components leverage [React](https://reactjs.org/) ([Vue.js](https://vuejs.org/) flavors are also available). -It means that you can: - -* Use **thousands of Symfony bundles and React components** with API Platform. -* Integrate API Platform in **any existing Symfony, React or Vue application**. -* Reuse **all your Symfony and JavaScript skills**, benefit of the incredible amount of documentation available. -* Enjoy the popular [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html) (used by default, but fully optional: - you can use the data provider you want, including but not limited to MongoDB and Elasticsearch) - -## Install - -[Read the official "Getting Started" guide](https://api-platform.com/docs/distribution). - -## Credits - -Created by [Kévin Dunglas](https://dunglas.fr). Commercial support available at [Les-Tilleuls.coop](https://les-tilleuls.coop). +```bash +docker-compose build +docker-compose up -d +``` diff --git a/api/api/public/apple-touch-icon.png b/api/api/public/apple-touch-icon.png deleted file mode 100644 index ff0eafb..0000000 Binary files a/api/api/public/apple-touch-icon.png and /dev/null differ diff --git a/api/api/public/favicon.ico b/api/api/public/favicon.ico deleted file mode 100644 index e5710b8..0000000 Binary files a/api/api/public/favicon.ico and /dev/null differ diff --git a/api/api/src/Entity/Greeting.php b/api/api/src/Entity/Greeting.php deleted file mode 100644 index 93c831a..0000000 --- a/api/api/src/Entity/Greeting.php +++ /dev/null @@ -1,35 +0,0 @@ -id; - } -} diff --git a/api/api/src/Entity/MedicineAdministrationWay.php b/api/api/src/Entity/MedicineAdministrationWay.php new file mode 100644 index 0000000..bff445d --- /dev/null +++ b/api/api/src/Entity/MedicineAdministrationWay.php @@ -0,0 +1,44 @@ +id; + } + + public function getCIS(): ?string + { + return $this->CIS; + } + + public function getAdministrationWay(): ?string + { + return $this->administration_way; + } +} diff --git a/api/api/src/Entity/MedicineHolder.php b/api/api/src/Entity/MedicineHolder.php new file mode 100644 index 0000000..31e3310 --- /dev/null +++ b/api/api/src/Entity/MedicineHolder.php @@ -0,0 +1,41 @@ +id; + } + + public function getCIS(): ?string + { + return $this->CIS; + } + + public function getName(): ?string + { + return $this->name; + } +} diff --git a/api/api/src/Entity/MedicineSpeciality.php b/api/api/src/Entity/MedicineSpeciality.php new file mode 100644 index 0000000..6824599 --- /dev/null +++ b/api/api/src/Entity/MedicineSpeciality.php @@ -0,0 +1,107 @@ +