{"id":25363456,"url":"https://github.com/vitexsoftware/multiflexi-server","last_synced_at":"2025-06-24T19:41:11.582Z","repository":{"id":266916070,"uuid":"899737612","full_name":"VitexSoftware/multiflexi-server","owner":"VitexSoftware","description":"REST API server library for MultiFlexi ecosystem","archived":false,"fork":false,"pushed_at":"2025-06-17T23:30:50.000Z","size":199,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T00:31:09.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VitexSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-06T22:45:12.000Z","updated_at":"2025-06-17T23:30:54.000Z","dependencies_parsed_at":"2024-12-07T01:19:27.460Z","dependency_job_id":"bf177aac-0c1e-4538-ac6a-cf7f9bb0ce78","html_url":"https://github.com/VitexSoftware/multiflexi-server","commit_stats":null,"previous_names":["vitexsoftware/multiflexi-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VitexSoftware/multiflexi-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fmultiflexi-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fmultiflexi-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fmultiflexi-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fmultiflexi-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VitexSoftware","download_url":"https://codeload.github.com/VitexSoftware/multiflexi-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fmultiflexi-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260465762,"owners_count":23013436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-14T22:32:29.859Z","updated_at":"2025-06-24T19:41:11.530Z","avatar_url":"https://github.com/VitexSoftware.png","language":"PHP","readme":"# MultiFlexi - PHP Slim 4 Server library for MultiFlexi API\n\n* [OpenAPI Generator](https://openapi-generator.tech)\n* [Slim 4 Documentation](https://www.slimframework.com/docs/v4/)\n\nThis server has been generated with [Slim PSR-7](https://github.com/slimphp/Slim-Psr7) implementation.\n[PHP-DI](https://php-di.org/doc/frameworks/slim.html) package used as dependency container.\n\n## Requirements\n\n* Web server with URL rewriting\n* PHP 7.4 or newer\n\nThis package contains `.htaccess` for Apache configuration.\nIf you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc.\n\n## Installation via [Composer](https://getcomposer.org/)\n\nNavigate into your project's root directory and execute the bash command shown below.\nThis command downloads the Slim Framework and its third-party dependencies into your project's `vendor/` directory.\n```bash\n$ composer install\n```\n\n## Add configs\n\n[PHP-DI package](https://php-di.org/doc/getting-started.html) helps to decouple configuration from implementation. App loads configuration files in straight order(`$env` can be `prod` or `dev`):\n1. `config/$env/default.inc.php` (contains safe values, can be committed to vcs)\n2. `config/$env/config.inc.php` (user config, excluded from vcs, can contain sensitive values, passwords etc.)\n3. `lib/App/RegisterDependencies.php`\n\n## Start devserver\n\nRun the following command in terminal to start localhost web server, assuming `./php-slim-server/public/` is public-accessible directory with `index.php` file:\n```bash\n$ php -S localhost:8888 -t php-slim-server/public\n```\n\u003e **Warning** This web server was designed to aid application development.\n\u003e It may also be useful for testing purposes or for application demonstrations that are run in controlled environments.\n\u003e It is not intended to be a full-featured web server. It should not be used on a public network.\n\n## Tests\n\n### PHPUnit\n\nThis package uses PHPUnit 8 or 9(depends from your PHP version) for unit testing.\n[Test folder](tests) contains templates which you can fill with real test assertions.\nHow to write tests read at [2. Writing Tests for PHPUnit - PHPUnit 8.5 Manual](https://phpunit.readthedocs.io/en/8.5/writing-tests-for-phpunit.html).\n\n#### Run\n\nCommand | Target\n---- | ----\n`$ composer test` | All tests\n`$ composer test-apis` | Apis tests\n`$ composer test-models` | Models tests\n\n#### Config\n\nPackage contains fully functional config `./phpunit.xml.dist` file. Create `./phpunit.xml` in root folder to override it.\n\nQuote from [3. The Command-Line Test Runner — PHPUnit 8.5 Manual](https://phpunit.readthedocs.io/en/8.5/textui.html#command-line-options):\n\n\u003e If phpunit.xml or phpunit.xml.dist (in that order) exist in the current working directory and --configuration is not used, the configuration will be automatically read from that file.\n\n### PHP CodeSniffer\n\n[PHP CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki). This tool helps to follow coding style and avoid common PHP coding mistakes.\n\n#### Run\n\n```bash\n$ composer phpcs\n```\n\n#### Config\n\nPackage contains fully functional config `./phpcs.xml.dist` file. It checks source code against PSR-1 and PSR-2 coding standards.\nCreate `./phpcs.xml` in root folder to override it. More info at [Using a Default Configuration File](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file)\n\n### PHPLint\n\n[PHPLint Documentation](https://github.com/overtrue/phplint). Checks PHP syntax only.\n\n#### Run\n\n```bash\n$ composer phplint\n```\n\n## Show errors\n\nSwitch your app environment to development\n- When using with some webserver =\u003e in `public/.htaccess` file:\n```ini\n## .htaccess\n\u003cIfModule mod_env.c\u003e\n    SetEnv APP_ENV 'development'\n\u003c/IfModule\u003e\n```\n\n- Or when using whatever else, set `APP_ENV` environment variable like this:\n```bash\nexport APP_ENV=development\n```\nor simply\n```bash\nexport APP_ENV=dev\n```\n\n## Mock Server\nSince this feature should be used for development only, change environment to `development` and send additional HTTP header `X-MultiFlexi\\Api-Mock: ping` with any request to get mocked response.\nCURL example:\n```console\ncurl --request GET \\\n    --url 'http://localhost:8888/v2/pet/findByStatus?status=available' \\\n    --header 'accept: application/json' \\\n    --header 'X-MultiFlexi\\Api-Mock: ping'\n[{\"id\":-8738629417578509312,\"category\":{\"id\":-4162503862215270400,\"name\":\"Lorem ipsum dol\"},\"name\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem i\",\"photoUrls\":[\"Lor\"],\"tags\":[{\"id\":-3506202845849391104,\"name\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectet\"}],\"status\":\"pending\"}]\n```\n\nUsed packages:\n* [Openapi Data Mocker](https://github.com/ybelenko/openapi-data-mocker) - first implementation of OAS3 fake data generator.\n* [Openapi Data Mocker Server Middleware](https://github.com/ybelenko/openapi-data-mocker-server-middleware) - PSR-15 HTTP server middleware.\n* [Openapi Data Mocker Interfaces](https://github.com/ybelenko/openapi-data-mocker-interfaces) - package with mocking interfaces.\n\n## Logging\n\nBuild contains pre-configured [`monolog/monolog`](https://github.com/Seldaek/monolog) package. Make sure that `logs` folder is writable.\nAdd required log handlers/processors/formatters in `lib/App/RegisterDependencies.php`.\n\n## API Endpoints\n\nAll URIs are relative to *https://virtserver.swaggerhub.com/VitexSoftware/MultiFlexi/1.0.0*\n\n\u003e Important! Do not modify abstract API controllers directly! Instead extend them by implementation classes like:\n\n```php\n// src/Api/PetApi.php\n\nnamespace MultiFlexi\\Api\\Server;\n\nuse MultiFlexi\\Api\\Server\\AbstractPetApi;\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse Psr\\Http\\Message\\ResponseInterface;\n\nclass PetApi extends AbstractPetApi\n{\n    public function addPet(\n        ServerRequestInterface $request,\n        ResponseInterface $response\n    ): ResponseInterface {\n        // your implementation of addPet method here\n    }\n}\n```\n\nWhen you need to inject dependencies into API controller check [PHP-DI - Controllers as services](https://github.com/PHP-DI/Slim-Bridge#controllers-as-services) guide.\n\nPlace all your implementation classes in `./src` folder accordingly.\nFor instance, when abstract class located at `./lib/Api/AbstractPetApi.php` you need to create implementation class at `./src/Api/PetApi.php`.\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*AbstractAppApi* | **setAppById** | **POST** /app/ | Create or Update Application\n*AbstractAppApi* | **getAppById** | **GET** /app/{appId}.{suffix} | Get App by ID\n*AbstractAppApi* | **listApps** | **GET** /apps.{suffix} | Show All Apps\n*AbstractCompanyApi* | **setCompanyById** | **POST** /company/ | Create or Update Company\n*AbstractCompanyApi* | **getCompanyById** | **GET** /company/{companyId}.{suffix} | Get Company by ID\n*AbstractCompanyApi* | **listCompanies** | **GET** /companies.{suffix} | Show All Companies\n*AbstractDefaultApi* | **rootGet** | **GET** / | Redirect to index\n*AbstractDefaultApi* | **getAllCredentialTypes** | **GET** /credential_types.{suffix} | Get All Credential Types\n*AbstractDefaultApi* | **getAllTopics** | **GET** /topics.{suffix} | Get All Topics\n*AbstractDefaultApi* | **getAllUserCredentials** | **GET** /credentials.{suffix} | Get All User Credentials\n*AbstractDefaultApi* | **getApiIndex** | **GET** /index.{suffix} | Endpoints listing\n*AbstractDefaultApi* | **getCredential** | **GET** /credential/{credentialId}.{suffix} | Get User Credentials\n*AbstractDefaultApi* | **getCredentialType** | **GET** /credential_type/{credentialTypeID}.{suffix} | Get Credential Type by ID\n*AbstractDefaultApi* | **getJobsStatus** | **GET** /jobs/status.{suffix} | Get Jobs Status\n*AbstractDefaultApi* | **getTopic** | **GET** /topic/{topicId}.{suffix} | Get Topic by ID\n*AbstractDefaultApi* | **loginSuffixGet** | **GET** /login.{suffix} | Return User's token\n*AbstractDefaultApi* | **loginSuffixPost** | **POST** /login.{suffix} | Return User's token\n*AbstractDefaultApi* | **pingSuffixGet** | **GET** /ping.{suffix} | job heartbeat operation\n*AbstractDefaultApi* | **statusSuffixGet** | **GET** /status.{suffix} | Get API status\n*AbstractDefaultApi* | **updateCredentialType** | **POST** /credential_type/{credentialTypeID}.{suffix} | Update Credential Type\n*AbstractDefaultApi* | **updateCredentials** | **POST** /credential/{credentialId}.{suffix} | Update Credentials\n*AbstractDefaultApi* | **updateTopic** | **POST** /topic/{topicId}.{suffix} | Update Topic\n*AbstractJobApi* | **setjobById** | **POST** /job/ | Create or Update job record\n*AbstractJobApi* | **getjobById** | **GET** /job/{jobId}.{suffix} | Get job by ID\n*AbstractJobApi* | **listjobs** | **GET** /jobs.{suffix} | Show All jobs\n*AbstractRuntemplateApi* | **setRunTemplateById** | **POST** /runtemplate | Create or Update RunTemplate\n*AbstractRuntemplateApi* | **getRunTemplateById** | **GET** /runtemplate/{runTemplateId}.{suffix} | Get RunTemplate by ID\n*AbstractRuntemplateApi* | **listRunTemplates** | **GET** /runtemplates.{suffix} | Show All RunTemplates\n*AbstractUserApi* | **setUserById** | **POST** /user/ | Create or Update User\n*AbstractUserApi* | **getUserById** | **GET** /user/{userId}.{suffix} | Get User by ID\n*AbstractUserApi* | **listUsers** | **GET** /users.{suffix} | Show All Users\n\n\n## Models\n\n* MultiFlexi\\Api\\Model\\App\n* MultiFlexi\\Api\\Model\\Company\n* MultiFlexi\\Api\\Model\\ConfField\n* MultiFlexi\\Api\\Model\\Configuration\n* MultiFlexi\\Api\\Model\\Credential\n* MultiFlexi\\Api\\Model\\CredentialType\n* MultiFlexi\\Api\\Model\\Customer\n* MultiFlexi\\Api\\Model\\GetCredentialType200Response\n* MultiFlexi\\Api\\Model\\GetTopic200Response\n* MultiFlexi\\Api\\Model\\Job\n* MultiFlexi\\Api\\Model\\JobsStatus\n* MultiFlexi\\Api\\Model\\RunTemplate\n* MultiFlexi\\Api\\Model\\Status\n* MultiFlexi\\Api\\Model\\Tag\n* MultiFlexi\\Api\\Model\\Topic\n* MultiFlexi\\Api\\Model\\UpdateCredentials201Response\n* MultiFlexi\\Api\\Model\\User\n\n\n## Authentication\n\n### Security schema `basicAuth`\n\u003e Important! To make Basic authentication work you need to extend [\\MultiFlexi\\Api\\Auth\\AbstractAuthenticator](./lib/Auth/AbstractAuthenticator.php) class by [\\MultiFlexi\\Api\\Auth\\BasicAuthenticator](./src/Auth/BasicAuthenticator.php) class.\n\n### Advanced middleware configuration\nRef to used Slim Token Middleware [dyorg/slim-token-authentication](https://github.com/dyorg/slim-token-authentication/tree/1.x#readme)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitexsoftware%2Fmultiflexi-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitexsoftware%2Fmultiflexi-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitexsoftware%2Fmultiflexi-server/lists"}