From 85112c2d62e2eda21e043aad91eacfd2db29f0f7 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 13:46:16 +0600 Subject: [PATCH 01/12] make compitable with laravel 10 --- .editorconfig | 16 -- .gitattributes | 10 -- .styleci.yml | 2 - .travis.yml | 40 ----- CHANGELOG.md | 346 -------------------------------------------- CONTRIBUTING.md | 49 ------- composer.json | 103 +++++-------- dingo.composer.json | 71 --------- phpstan.neon | 14 -- 9 files changed, 35 insertions(+), 616 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .gitattributes delete mode 100644 .styleci.yml delete mode 100644 .travis.yml delete mode 100644 CHANGELOG.md delete mode 100644 CONTRIBUTING.md delete mode 100644 dingo.composer.json delete mode 100644 phpstan.neon diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 1492202b..00000000 --- a/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true - -[*.md] -trim_trailing_whitespace = false - -[*.yml] -indent_style = space -indent_size = 2 diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 88e96eb7..00000000 --- a/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -* text=auto - -/tests export-ignore -/.editorconfig export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore -/.travis.yml export-ignore -/phpunit.xml export-ignore -/README.md export-ignore -/body-params.png export-ignore diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 5d4095a3..00000000 --- a/.styleci.yml +++ /dev/null @@ -1,2 +0,0 @@ -preset: psr12 - diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 23cd9442..00000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -dist: bionic -language: php - -env: - global: - - SETUP=stable - -matrix: - fast_finish: true - include: - - php: 7.4 - env: COMPOSER=dingo.composer.json - name: "With Dingo router" - - php: 7.4 - env: SETUP=lint - name: "Lint code" - - php: 7.2 - - php: 7.2 - env: SETUP=lowest - - php: 7.3 - - php: 7.3 - env: SETUP=lowest - - php: 7.4 - - php: 7.4 - env: SETUP=lowest - -cache: - directories: - - $HOME/.composer/cache - -before_install: - - travis_retry composer self-update - -install: - - if [[ $SETUP = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi - - if [[ $SETUP = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi - - if [[ $SETUP = 'lint' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; travis_retry composer lint; fi - -script: - - if [[ $SETUP = 'lint' ]]; then exit 0; fi; composer test-ci; diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index aeeb3851..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,346 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## Unreleased -### Added - -### Changed - -### Fixed - -### Removed - -## 4.8.0 - Saturday, 2 May 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.7.0...4.8.0)) -### Added -- Support @hideFromAPIDocumentation on controllers. (https://github.com/mpociot/laravel-apidoc-generator/pull/745) -- Allow strategies to return null. (https://github.com/mpociot/laravel-apidoc-generator/pull/739) - -## 4.7.0 - Sunday, 12 April 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.6.0...4.7.0)) -### Added -- Support for Laravel Vapor. (https://github.com/mpociot/laravel-apidoc-generator/pull/729) -- Allow customization of static output path. (https://github.com/mpociot/laravel-apidoc-generator/pull/730) - -## 4.6.0 - Wednesday, 8 April 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.5.1...4.6.0)) -### Added -- Allow `@authenticated` to be set at controller level. (https://github.com/mpociot/laravel-apidoc-generator/pull/726) - -## 4.5.1 - Saturday, 4 April 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.5.0...4.5.1)) -### Fixed -- Fix version constraint...again. (https://github.com/mpociot/laravel-apidoc-generator/pull/725) - -## 4.5.0 - Tuesday, 31 March 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.4.3...4.5.0)) -### Fixed -- Fix version constraints preventing installation on some Laravel 7 installations. - -## 4.4.3 - Thursday, 26 March 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.4.2...4.4.3)) -### Fixed -- Fixed link to Postman connection in docs when Laravel autoload is used (https://github.com/mpociot/laravel-apidoc-generator/pull/714) - -## 4.4.2 - Sunday, 21 March 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.4.1...4.4.2)) -### Fixed -- Fixed double json encode when fetching collection in Laravel type docs (https://github.com/mpociot/laravel-apidoc-generator/pull/713) - - -## 4.4.1 - Wednesday, 11 March 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.4.0...4.4.1)) -### Added -- Support for body params as array (https://github.com/mpociot/laravel-apidoc-generator/pull/710) - -## 4.4.0 - Saturday, 7 March 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.3.1...4.4.0)) -### Fixed -- Array query params can now be used and render properly (https://github.com/mpociot/laravel-apidoc-generator/pull/700) - -## 4.3.1 - Friday, 6 March 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.3.0...4.3.1)) -### Changed -- Updated Documentarian dependency for Laravel v7 (https://github.com/mpociot/laravel-apidoc-generator/pull/699) - -## 4.3.0 - Saturday, 22 February 2020 ([compare to previous](https://github.com/mpociot/laravel-apidoc-generator/compare/4.2.4...4.3.0)) -### Changed -- Updated nunomaduro/collision to include v4 (https://github.com/mpociot/laravel-apidoc-generator/pull/699) - -### Fixed -- Use correct protocol for Postman collcetion URL (https://github.com/mpociot/laravel-apidoc-generator/pull/697) - -## [4.2.4] - Saturday, 15 February 2020 -### Fixed -- Shim URL::formatRoot() on Lumen (https://github.com/mpociot/laravel-apidoc-generator/pull/688) - -## [4.2.3] - Tuesday, 4 February 2020 -### Changed -- Made "Skipping route" message more descriptive (https://github.com/mpociot/laravel-apidoc-generator/commit/6f61469a9fa8be30e7812cf622a7832163a08bb8) - -## [4.2.2] - Tuesday, 21 January 2020 -### Fixed -- Set a default value for the routematcher when fetching from config (https://github.com/mpociot/laravel-apidoc-generator/pull/677) - -## [4.2.1] - Monday, 20 January 2020 -### Fixed -- Fixed autogenerated docs endpoint address for Postman collection (https://github.com/mpociot/laravel-apidoc-generator/pull/673) - -## [4.2.0] - Sunday, 19 January 2020 -### Added -- New Postman collection generation features (https://github.com/mpociot/laravel-apidoc-generator/pull/666): - - Properly handle url parameters using the `:param` syntax (opposed to the Laravel-esque `{param}` syntax) - - Allow configuring the auth section of Postman collection config - - Add some documentation that was available but not exported in the Postman collection (for URL params and query params) - -### Changed -- The package can now create a documentation endpoint automatically for `laravel`-type routes. This also allows users to install the package on dev-only enviornments but have their routes available in others, without writing custom routing code. (https://github.com/mpociot/laravel-apidoc-generator/pull/659) - -### Fixed -- Error when installing due to DI not working properly on constructor (https://github.com/mpociot/laravel-apidoc-generator/pull/672) - -## [4.1.0] - Monday, 6 January 2019 -### Added -- RouteMatcher to use can now be specified by user (https://github.com/mpociot/laravel-apidoc-generator/pull/657) - -### Fixed -- Also copy custom logo for non-static docs (https://github.com/mpociot/laravel-apidoc-generator/commit/720f9c9e9b2443bcfb474b959febaf6cf5c3f004) - -## [4.0.2] - Monday, 25 November 2019 -### Fixed -- Fixed missing body parameters in response calls (https://github.com/mpociot/laravel-apidoc-generator/commit/5d9371c14391485630941c718d7f168afd540126) -- Add slashes to header values in bash templates to escape special chars (https://github.com/mpociot/laravel-apidoc-generator/commit/e693d746b1c1daf342c28e53daa8f7b34ce9da2b) -- Fixed iteration over null bug - set responses to empty array (https://github.com/mpociot/laravel-apidoc-generator/commit/a24b1e14b17ade8fb4aa1534448904e1075b004c) - -## [4.0.1] - Monday, 16 November 2019 -### Fixed -- Update rebuild command to work with new docs locations (https://github.com/mpociot/laravel-apidoc-generator/pull/646) - -## [4.0.0] - Thursday, 7 November 2019 -### Added -- Added `headers` stage (https://github.com/mpociot/laravel-apidoc-generator/pull/624) -- Support for non-static docs, changed source files locations (https://github.com/mpociot/laravel-apidoc-generator/pull/608) -- Support for Eloquent API resources (https://github.com/mpociot/laravel-apidoc-generator/pull/601) -- `bindings` replaced by `@urlParam` annotation (https://github.com/mpociot/laravel-apidoc-generator/pull/599) -- Better support for arrays and objects in bodyParams (https://github.com/mpociot/laravel-apidoc-generator/pull/597) - -### Modified -- Postman collection now have the body as `raw` instead of `formdata`. (https://github.com/mpociot/laravel-apidoc-generator/pull/627) -- Nonexistent `@responseFile` annotations now show a warning and skip the route (https://github.com/mpociot/laravel-apidoc-generator/pull/620) -- Use symfony/var-exporter to export PHP arrays, ensuring short array syntax (https://github.com/mpociot/laravel-apidoc-generator/pull/615) -- Use single quotes in PHP example template (https://github.com/mpociot/laravel-apidoc-generator/pull/612) -- Transformer annotations are now given priority over all other response strategies (https://github.com/mpociot/laravel-apidoc-generator/pull/620) -- Made ResponseCalls strategy only execute if no successful responses exist. (https://github.com/mpociot/laravel-apidoc-generator/pull/605) -- Hide null responses in examples. (https://github.com/mpociot/laravel-apidoc-generator/pull/605) -- Made `responses` stage additive (https://github.com/mpociot/laravel-apidoc-generator/pull/605) -- Renamed `query` and `body` in `response_calls` config to `queryParams` and `bodyParams` (https://github.com/mpociot/laravel-apidoc-generator/pull/603) - -### Removed -- Removed `apply.response_calls.headers` in favour of `apply.headers` (https://github.com/mpociot/laravel-apidoc-generator/pull/603) -- Removed bindings in response_calls (https://github.com/mpociot/laravel-apidoc-generator/pull/599) - -## [3.17.1] - Thursday, 12 September 2019 -### Fixed -- ResponseCalls: Call Lumen application correctly since it does not use HttpKernel (https://github.com/mpociot/laravel-apidoc-generator/pull/585) -- Update usage of `clean*Parameters` in python template (https://github.com/mpociot/laravel-apidoc-generator/commit/02fb719d0d6c25e6ce72f30dc8b9604449061156) -- Bugfix: *really* exclude parameters from examples, not just send empty strings (https://github.com/mpociot/laravel-apidoc-generator/commit/762e2e1003d389d6e785d31144eca89c40515926, https://github.com/mpociot/laravel-apidoc-generator/commit/e54b474578b53f97f4737664a63131b315aaf82d) - -## [3.17.0] - Saturday, 7 September 2019 -### Added -- Switched to a plugin architecture that allows support for external strategies (https://github.com/mpociot/laravel-apidoc-generator/pull/570) - -### Changed -- Exclude Laravel Telescope routes when present (https://github.com/mpociot/laravel-apidoc-generator/pull/579) -- Set status code for transformer response from tag if present (https://github.com/mpociot/laravel-apidoc-generator/pull/581) -- Set status code for response call from actual response (https://github.com/mpociot/laravel-apidoc-generator/pull/581) - -## [3.16.3] - Thursday, 5 September 2019 -### Fixed -- Removed references to removed helper functions in 6.0 (https://github.com/mpociot/laravel-apidoc-generator/pull/576) - -## [3.16.2] - Wednesday, 4 September 2019 -### Fixed -- Support for Laravel 6 (https://github.com/mpociot/laravel-apidoc-generator/commit/f7dd8d19b75755763e8e20ab4025075eba5cd51a) - -## [3.16.1] - Wednesday, 4 September 2019 -### Added -- Use HTTPS in Postman collection if base_url is HTTPS (https://github.com/mpociot/laravel-apidoc-generator/pull/575) - -## [3.16.0] - Wednesday, 4 September 2019 -### Added -- Support for Laravel 6 (https://github.com/mpociot/laravel-apidoc-generator/pull/572) - -## [3.15.0] - Saturday, 31 August 2019 -### Added -- Ability to exclude a query or body parameter from being included in the example requests (https://github.com/mpociot/laravel-apidoc-generator/pull/552) - -## [3.14.0] - Saturday, 31 August 2019 -### Fixed -- Backwards compatibility for the changes to `@group` introduced in 3.12.0 (https://github.com/mpociot/laravel-apidoc-generator/commit/5647eda35ebb7f8aed35b31790c5f220b736e985) - -## [3.13.0] (deleted) - -## [3.12.0] - Sunday, 25 August 2019 -### Fixed -- Specifying an `@group` for a method no longer requires you to add the description. (https://github.com/mpociot/laravel-apidoc-generator/pull/556) -- Pass the verbosity level down to the Collision library. (https://github.com/mpociot/laravel-apidoc-generator/pull/556) - -## [3.11.0] - Friday, 9 August 2019 -### Added -- Support for query parameters in the bash template (https://github.com/mpociot/laravel-apidoc-generator/pull/545) -- Include query parameters and headers in the generated Postman collection (https://github.com/mpociot/laravel-apidoc-generator/pull/537) -- Include Python out of the box as example language (https://github.com/mpociot/laravel-apidoc-generator/pull/524) - -### Changed -- Moved nunomaduro/collision to "suggested" so it doesn't break PHP 7.0 (https://github.com/mpociot/laravel-apidoc-generator/commit/2f3a2144e1a4f1eb0229aea8b4d11707cb4aabbf) - -### Fixed -- Stopped using config helper inside config file (https://github.com/mpociot/laravel-apidoc-generator/pull/548) - -## [3.10.0] - Sunday, 23 June 2019 -### Added -- `--verbose` flag to show exception encountered when making response calls (https://github.com/mpociot/laravel-apidoc-generator/commit/dc987f296e5a3d073f56c67911b2cb61ae47e9dc) - -## [3.9.0] - Saturday, 8 June 2019 -### Modified -- Postman collections and URLs in example requests now use the `apidoc.base_url` config variable (https://github.com/mpociot/laravel-apidoc-generator/pull/523) - -## [3.8.0] - Wednesday, 29 May 2019 -### Added -- Support for PHP array callable syntax in route action (https://github.com/mpociot/laravel-apidoc-generator/pull/516) - -## [3.7.3] - Thursday, 23 May 2019 -### Fixed -- Added faker_seed (https://github.com/mpociot/laravel-apidoc-generator/commit/d2901e51a68c17066d4dd96054ff5bfdf124945b) - -## [3.7.2] - Sunday, 19 May 2019 -### Added -- Support for URL paths in include/exclude rules (https://github.com/mpociot/laravel-apidoc-generator/pull/507) - -## [3.7.1] - Friday, 17 May 2019 -### Fixed -- Handle exception for no URL::forceRootURL() method in Lumen (https://github.com/mpociot/laravel-apidoc-generator/commit/2146fa114dc18bc32c00b5c5550266d753d5aef3) -- Url parameter bindings (https://github.com/mpociot/laravel-apidoc-generator/commit/f0dc118c6b7792894bf9baa352d7fc4ca8ca74b5) - -## [3.7.0] - Thursday, 2 May 2019 -### Added -- Support for `@queryParams` in Dingo FormRequests (https://github.com/mpociot/laravel-apidoc-generator/pull/506) -- Easier customisation of example languages (https://github.com/mpociot/laravel-apidoc-generator/commit/0aa737a2e54a913eab4d024a1644c5ddd5dee8b8) -- Include PHP as example language (https://github.com/mpociot/laravel-apidoc-generator/commit/c5814762fa52095fe645716554839b6ae110ef89) - -## [3.6.0] - Monday, 29 April 2019 -### Added -- Support for `@queryParams` in FormRequests (https://github.com/mpociot/laravel-apidoc-generator/pull/504) -- Added `default_group` key to replace `ungrouped_name` (https://github.com/mpociot/laravel-apidoc-generator/commit/72b5f546c1b84e69fe43c720a04f448c3b96e345) - -## [3.5.0] - Tuesday, 23 April 2019 -### Added -- Option to seed faker for deterministic output (https://github.com/mpociot/laravel-apidoc-generator/pull/503) -- Support for binding prefixes (https://github.com/mpociot/laravel-apidoc-generator/pull/498) -- Ability to override Laravel `config` (https://github.com/mpociot/laravel-apidoc-generator/pull/496) -- Allow override of the name 'general' for ungrouped routes (https://github.com/mpociot/laravel-apidoc-generator/pull/491) - -### Changed -- Use parameter-bound URL in doc examples (https://github.com/mpociot/laravel-apidoc-generator/pull/500) - -### Fixed -- Request router now matches when router has sub-domain (https://github.com/mpociot/laravel-apidoc-generator/pull/493) - -## [3.4.4] - Saturday, 30 March 2019 -### Fixed -- Allow users specify custom Content-type header for Markdown examples (https://github.com/mpociot/laravel-apidoc-generator/pull/486) - -## [3.4.3] - Wednesday, 13 March 2019 -### Fixed -- Ignore scalar type hints when checking for FormRequests (https://github.com/mpociot/laravel-apidoc-generator/pull/474) - -## [3.4.2] - Sunday, 10 March 2019 -### Added -- Ability to set cookies on response calls (https://github.com/mpociot/laravel-apidoc-generator/pull/471) - -## [3.4.1] - Monday, 4 March 2019 -### Fixed -- Support for Lumen 5.7 (https://github.com/mpociot/laravel-apidoc-generator/pull/467) - -## [3.4.0] - Wednesday, 27 February 2019 -### Added -- Support for Laravel 5.8 (https://github.com/mpociot/laravel-apidoc-generator/pull/462) -- Ability to annotate body parameters on FormRequest (https://github.com/mpociot/laravel-apidoc-generator/pull/460) - - -## [3.3.2] - Tuesday, 12 February 2019 -### Added -- Ability to specify array and object body/query params using dot notation (https://github.com/mpociot/laravel-apidoc-generator/pull/445) -- Ability to specify name and description of Postman collection (https://github.com/mpociot/laravel-apidoc-generator/pull/443) - -### Fixed -- Postman collection and documentation base URL now uses `config('app.url')` (https://github.com/mpociot/laravel-apidoc-generator/pull/458) - -## [3.3.1] - Tuesday, 8 January 2019 -### Fixed -- Fixed vendor tags (https://github.com/mpociot/laravel-apidoc-generator/pull/444) - -## [3.3.0] - Wednesday, 2 January 2019 -### Added -- Ability to replace json key values in response file (https://github.com/mpociot/laravel-apidoc-generator/pull/434) -- Support for custom transfer serializers (https://github.com/mpociot/laravel-apidoc-generator/pull/441) - -## [3.2.0] - Wednesday, 12 December 2018 -### Changed -- API groups are now sorted "naturally" (https://github.com/mpociot/laravel-apidoc-generator/pull/428) - -### Fixed -- Partial resource controllers are now properly supported (https://github.com/mpociot/laravel-apidoc-generator/pull/429) -- PUT request body now formatted as `urlencoded` in Postman collection (https://github.com/mpociot/laravel-apidoc-generator/pull/418) -- `@responseFile` strategy now properly renders responses (https://github.com/mpociot/laravel-apidoc-generator/pull/427) - -## [3.1.1] - Wednesday, 5 December 2018 -### Added -- Ability to specify different responses for different status codes. (https://github.com/mpociot/laravel-apidoc-generator/pull/416) - -## [3.1.0] - Wednesday, 28 November 2018 -### Added -- Add `ResponseFileStrategy` to retrieve responses from files. (https://github.com/mpociot/laravel-apidoc-generator/pull/410) - -### Modified -- Switch from `jQuery` to `fetch` in JavaScript examples. (https://github.com/mpociot/laravel-apidoc-generator/pull/411) - -## [3.0.6] - Saturday, 24 November 2018 -### Added -- `include` and `exclude` route options now support wildcards (https://github.com/mpociot/laravel-apidoc-generator/pull/409) - -## [3.0.5] - Thursday, 15 November 2018 -### Fixed -- Make `router` option case-insensitive (https://github.com/mpociot/laravel-apidoc-generator/pull/407) - -## [3.0.4] - Wednesday, 7 November 2018 -### Fixed -- Replaced use of `Storage::copy` with PHP's `copy` to work with absolute paths (https://github.com/mpociot/laravel-apidoc-generator/pull/404) - -## [3.0.3] - Friday, 2 November 2018 -### Fixed -- Replaced use of `config_path` with more generic option for better Lumen compatibility (https://github.com/mpociot/laravel-apidoc-generator/pull/398) - -## [3.0.2] - Friday, 26 October 2018 -### Added -- Ability to specify examples for body and query parameters (https://github.com/mpociot/laravel-apidoc-generator/pull/394) -### Fixed -- Rendering of example requests' descriptions (https://github.com/mpociot/laravel-apidoc-generator/pull/393) - -## [3.0.1] - Monday, 22 October 2018 -### Fixed -- Rendering of query parameters' descriptions (https://github.com/mpociot/laravel-apidoc-generator/pull/387) - -## [3.0] - Sunday, 21 October 2018 -### Added -- Official Lumen support (https://github.com/mpociot/laravel-apidoc-generator/pull/382) -- `@queryParam` annotation (https://github.com/mpociot/laravel-apidoc-generator/pull/383) -- `@bodyParam` annotation (https://github.com/mpociot/laravel-apidoc-generator/pull/362, https://github.com/mpociot/laravel-apidoc-generator/pull/366) -- `@authenticated` annotation (https://github.com/mpociot/laravel-apidoc-generator/pull/369) -- Ability to override the controller `@group` from the method. (https://github.com/mpociot/laravel-apidoc-generator/pull/372) -- Ability to use a custom logo (https://github.com/mpociot/laravel-apidoc-generator/pull/368) - -### Changed -- Moved from command-line options to a config file (https://github.com/mpociot/laravel-apidoc-generator/pull/362) -- Commands have been renamed to the `apidoc` namespace (previously `api`). (https://github.com/mpociot/laravel-apidoc-generator/pull/350) -- The `update` command has been renamed to `rebuild` and now uses the output path configured in the config file. (https://github.com/mpociot/laravel-apidoc-generator/pull/370) -- `@resource` renamed to `@group` (https://github.com/mpociot/laravel-apidoc-generator/pull/371) -- Added more configuration options for response calls (https://github.com/mpociot/laravel-apidoc-generator/pull/377) - -### Fixed - -### Removed -- FormRequest parsing is no longer supported (https://github.com/mpociot/laravel-apidoc-generator/pull/362) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 9234426e..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,49 +0,0 @@ -# Contributing - -Contributions are welcome. - -## Etiquette - -This project is open source, and as such, the maintainers give their free time to build and maintain the source code -held within. They make the code freely available in the hope that it will be of use to other developers. It would be -extremely unfair for them to suffer abuse or anger for their hard work. - -Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the -world that developers are civilized and selfless people. - -It's the duty of the maintainer to ensure that all submissions to the project are of sufficient -quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. - -## Viability - -When requesting or submitting new features, first consider whether it might be useful to others. Open -source projects are used by many developers, who may have entirely different needs to your own. Think about -whether or not your feature is likely to be used by other users of the project. - -## Procedure - -Before filing an issue: - -- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. -- Check to make sure your feature suggestion isn't already present within the project. -- Check the pull requests tab to ensure that the bug doesn't have a fix in progress. -- Check the pull requests tab to ensure that the feature isn't already in progress. - -Before submitting a pull request: - -- Check the codebase to ensure that your feature doesn't already exist. -- Check the pull requests to ensure that another person hasn't already submitted the feature or fix. - -## Requirements - -- If your contribution changes the look of the generated documentation in some way, please include "before" and "after" screenshots in your pull request. - -- Add a description to your pull request so the reviewer knows what to look out for before looking through your changes - -- **Add tests!** - Your patch won't be accepted if it doesn't have tests. - -- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. - -- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. - -**Happy coding**! diff --git a/composer.json b/composer.json index 9249c973..aebd2794 100644 --- a/composer.json +++ b/composer.json @@ -1,71 +1,38 @@ { - "name": "mpociot/laravel-apidoc-generator", - "license": "MIT", - "description": "Generate beautiful API documentation from your Laravel application", - "keywords": [ - "API", - "Documentation", - "Laravel" - ], - "homepage": "http://github.com/mpociot/laravel-apidoc-generator", - "authors": [ - { - "name": "Marcel Pociot", - "email": "m.pociot@gmail.com" - } - ], - "require": { - "php": ">=7.2.0", - "ext-json": "*", - "fzaninotto/faker": "^1.8", - "illuminate/console": "^5.7|^6.0|^7.0|^8.0", - "illuminate/routing": "^5.7|^6.0|^7.0|^8.0", - "illuminate/support": "^5.7|^6.0|^7.0|^8.0", - "league/flysystem": "^1.0", - "mpociot/documentarian": "^0.4.0", - "mpociot/reflection-docblock": "^1.0.1", - "nunomaduro/collision": "^3.0|^4.0|^5.0", - "ramsey/uuid": "^3.8|^4.0", - "symfony/var-exporter": "^4.0|^5.0" - }, - "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.1.0", - "laravel/lumen-framework": "^5.7|^6.0|^7.0|^8.0", - "league/fractal": "^0.19.0", - "orchestra/testbench": "^3.7|^4.0|^5.0", - "phpstan/phpstan": "^0.11.15", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "league/fractal": "Required for transformers support" - }, - "autoload": { - "psr-4": { - "Mpociot\\ApiDoc\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Mpociot\\ApiDoc\\Tests\\": "tests/" - } - }, - "scripts": { - "lint": "phpstan analyse -c ./phpstan.neon src", - "test": "phpunit --stop-on-failure --exclude-group dingo", - "test-ci": "phpunit --exclude-group dingo" - }, - "extra": { - "laravel": { - "providers": [ - "Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider" - ] - }, - "branch-alias": { - "dev-v4": "4.x-dev" - } - }, - "config": { - "preferred-install": "dist", - "sort-packages": true + "name": "mpociot/laravel-apidoc-generator", + "license": "MIT", + "description": "Generate beautiful API documentation from your Laravel application", + "keywords": [ + "API", + "Documentation", + "Laravel" + ], + "homepage": "http://github.com/mpociot/laravel-apidoc-generator", + "authors": [ + { + "name": "Marcel Pociot", + "email": "m.pociot@gmail.com" } + ], + "require": { + "php": "^8.0", + "illuminate/support": "^10.0" + }, + "autoload": { + "psr-4": { + "Mpociot\\ApiDoc\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Mpociot\\ApiDoc\\Tests\\": "tests/" + } + }, + "extra": { + "laravel": { + "providers": [ + "Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider" + ] + } + } } diff --git a/dingo.composer.json b/dingo.composer.json deleted file mode 100644 index 83004b63..00000000 --- a/dingo.composer.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "mpociot/laravel-apidoc-generator", - "license": "MIT", - "description": "Generate beautiful API documentation from your Laravel application", - "keywords": [ - "API", - "Documentation", - "Laravel" - ], - "homepage": "http://github.com/mpociot/laravel-apidoc-generator", - "authors": [ - { - "name": "Marcel Pociot", - "email": "m.pociot@gmail.com" - } - ], - "require": { - "php": ">=7.2.0", - "ext-json": "*", - "fzaninotto/faker": "^1.8", - "illuminate/console": "^5.7|^6.0|^7.0|^8.0", - "illuminate/routing": "^5.7|^6.0|^7.0|^8.0", - "illuminate/support": "^5.7|^6.0|^7.0|^8.0", - "league/flysystem": "^1.0", - "mpociot/documentarian": "^0.4.0", - "mpociot/reflection-docblock": "^1.0.1", - "nunomaduro/collision": "^3.0|^4.0|^5.0", - "ramsey/uuid": "^3.8|^4.0", - "symfony/var-exporter": "^4.0|^5.0" - }, - "require-dev": { - "dingo/api": "^2.3", - "dms/phpunit-arraysubset-asserts": "^0.1.0", - "league/fractal": "^0.17.0", - "orchestra/testbench": "^3.7|^4.0|^5.0", - "phpstan/phpstan": "^0.11.15", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "league/fractal": "Required for transformers support" - }, - "autoload": { - "psr-4": { - "Mpociot\\ApiDoc\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Mpociot\\ApiDoc\\Tests\\": "tests/" - } - }, - "scripts": { - "lint": "phpstan analyse -c ./phpstan.neon src", - "test": "phpunit --stop-on-failure --group dingo", - "test-ci": "phpunit --group dingo" - }, - "extra": { - "laravel": { - "providers": [ - "Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider" - ] - }, - "branch-alias": { - "dev-v4": "4.x-dev" - } - }, - "config": { - "preferred-install": "dist", - "sort-packages": true - } -} diff --git a/phpstan.neon b/phpstan.neon deleted file mode 100644 index 122c7957..00000000 --- a/phpstan.neon +++ /dev/null @@ -1,14 +0,0 @@ -parameters: - level: 5 - reportUnmatchedIgnoredErrors: false - inferPrivatePropertyTypeFromConstructor: true - ignoreErrors: - - '#Call to an undefined static method Illuminate\\Support\\Facades\\Route::getRoutes().#' - - '#Call to an undefined static method Illuminate\\Support\\Facades\\URL::forceRootUrl()#' - - '#Call to an undefined static method Illuminate\\Support\\Facades\\URL::formatRoot()#' - - '#Cannot access offset .+ on Illuminate\\Contracts\\Foundation\\Application.#' - - '#Call to an undefined method Illuminate\\Routing\\Route::versions().#' - - '#(.*)NunoMaduro\\Collision(.*)#' - - '#Instantiated class Whoops\\Exception\\Inspector not found\.#' - - '#.+Dingo.+#' - - '#Call to an undefined method Illuminate\\Contracts\\Filesystem\\Filesystem::url()#' From 59d131a36fcb2402daf7696e53ec780053c35ba3 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 13:52:10 +0600 Subject: [PATCH 02/12] make compitable with laravel 10 --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index aebd2794..e142b458 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,11 @@ ], "require": { "php": "^8.0", - "illuminate/support": "^10.0" + "illuminate/support": "^10.0", + "simonsraz/slate-laravel-apidoc": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Mpociot\\ApiDoc\\": "src/" From 95dbe296b722eff713da9d95fc902a4cf9e172d1 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 13:54:48 +0600 Subject: [PATCH 03/12] make compitable with laravel 10 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index e142b458..b1e26a10 100644 --- a/composer.json +++ b/composer.json @@ -2,6 +2,7 @@ "name": "mpociot/laravel-apidoc-generator", "license": "MIT", "description": "Generate beautiful API documentation from your Laravel application", + "version": "1.0", "keywords": [ "API", "Documentation", From 8e888a4f55aecc58de41464a2082295001142a5c Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:21:28 +0600 Subject: [PATCH 04/12] make compitable with laravel 10 --- composer.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b1e26a10..f8b4142b 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,19 @@ "email": "m.pociot@gmail.com" } ], + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/simonsraz/slate-laravel-apidoc" + } + ], + "minimum-stability": "dev", + "prefer-stable": true, "require": { "php": "^8.0", "illuminate/support": "^10.0", "simonsraz/slate-laravel-apidoc": "^1.0" }, - "minimum-stability": "dev", - "prefer-stable": true, "autoload": { "psr-4": { "Mpociot\\ApiDoc\\": "src/" From 128a9da014c43fbca3a84f46b72c1dd3ab06f1c4 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:26:17 +0600 Subject: [PATCH 05/12] make compitable with laravel 10 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f8b4142b..47b13f6f 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "mpociot/laravel-apidoc-generator", + "name": "simonsraz/slate-laravel-apidoc", "license": "MIT", "description": "Generate beautiful API documentation from your Laravel application", "version": "1.0", From 79297d4eb1588d1a393d2add135577588e1c66e0 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:28:04 +0600 Subject: [PATCH 06/12] make compitable with laravel 10 --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 47b13f6f..aa1f18c3 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,6 @@ "url": "https://github.com/simonsraz/slate-laravel-apidoc" } ], - "minimum-stability": "dev", "prefer-stable": true, "require": { "php": "^8.0", From d5b189e5b24c358ff20141efca577d4791f581fa Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:31:05 +0600 Subject: [PATCH 07/12] make compitable with laravel 10 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index aa1f18c3..760c2b49 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "email": "m.pociot@gmail.com" } ], + "minimum-stability": "dev", "repositories": [ { "type": "vcs", From 8ff6879ecb1b1eb7737e9e51bc87ae13c67a1a9a Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:33:25 +0600 Subject: [PATCH 08/12] make compitable with laravel 10 --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 760c2b49..aa1f18c3 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "email": "m.pociot@gmail.com" } ], - "minimum-stability": "dev", "repositories": [ { "type": "vcs", From 6d7e44ec20f99b77800ace4f680af9c6f9bcc212 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:35:56 +0600 Subject: [PATCH 09/12] make compitable with laravel 10 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index aa1f18c3..47b13f6f 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ "url": "https://github.com/simonsraz/slate-laravel-apidoc" } ], + "minimum-stability": "dev", "prefer-stable": true, "require": { "php": "^8.0", From 043b36c61c419b5b49bcbf38f84ec7c1b831cef6 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:39:28 +0600 Subject: [PATCH 10/12] make compitable with laravel 10 --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 47b13f6f..5c6d8606 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,7 @@ "prefer-stable": true, "require": { "php": "^8.0", - "illuminate/support": "^10.0", - "simonsraz/slate-laravel-apidoc": "^1.0" + "illuminate/support": "^10.0" }, "autoload": { "psr-4": { From a7c2178fc45091191b2483d99b0c17290edc6622 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 14:40:51 +0600 Subject: [PATCH 11/12] make compitable with laravel 10 --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 5c6d8606..3c15e6ae 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,6 @@ "name": "simonsraz/slate-laravel-apidoc", "license": "MIT", "description": "Generate beautiful API documentation from your Laravel application", - "version": "1.0", "keywords": [ "API", "Documentation", From 2d54ee6114298300855f0ec676668ff8b9c6d499 Mon Sep 17 00:00:00 2001 From: Simon S Raz Date: Tue, 17 Sep 2024 15:29:40 +0600 Subject: [PATCH 12/12] Check --- .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/php.xml | 25 +++ .idea/slate-laravel-apidoc.iml | 30 +++ .idea/vcs.xml | 6 + .idea/workspace.xml | 181 ++++++++++++++++++ .gitignore => Backup/.gitignore | 0 LICENSE.md => Backup/LICENSE.md | 0 Backup/README.md | 51 +++++ body_params_1.png => Backup/body_params_1.png | Bin body_params_2.png => Backup/body_params_2.png | Bin Backup/composer.json | 46 +++++ {config => Backup/config}/apidoc.php | 0 {docs => Backup/docs}/_index.md | 0 {docs => Backup/docs}/extending/_index.md | 0 {docs => Backup/docs}/extending/plugins.md | 0 .../docs}/getting-started/_index.md | 0 .../docs}/getting-started/configuration.md | 0 .../getting-started/documenting-your-api.md | 0 .../generating-documentation.md | 0 .../docs}/getting-started/installation.md | 0 .../docs}/getting-started/migrating.md | 0 .../docs}/under-the-hood/_index.md | 0 .../docs}/under-the-hood/architecture.md | 0 .../docs}/under-the-hood/how-it-works.md | 0 phpunit.xml => Backup/phpunit.xml | 0 .../resources}/views/documentarian.blade.php | 0 .../partials/example-requests/bash.blade.php | 0 .../example-requests/javascript.blade.php | 0 .../partials/example-requests/php.blade.php | 0 .../example-requests/python.blade.php | 0 .../views/partials/frontmatter.blade.php | 0 .../resources}/views/partials/info.blade.php | 0 .../resources}/views/partials/route.blade.php | 0 Backup/routes/laravel.php | 13 ++ Backup/routes/web.php | 7 + {src => Backup/src}/ApiDoc.php | 0 .../src}/ApiDocGeneratorServiceProvider.php | 0 .../src}/Commands/GenerateDocumentation.php | 0 .../src}/Commands/RebuildDocumentation.php | 0 {src => Backup/src}/Extracting/Generator.php | 0 .../src}/Extracting/ParamHelpers.php | 0 .../src}/Extracting/RouteDocBlocker.php | 0 .../BodyParameters/GetFromBodyParamTag.php | 0 .../Strategies/Metadata/GetFromDocBlocks.php | 0 .../QueryParameters/GetFromQueryParamTag.php | 0 .../RequestHeaders/GetFromRouteRules.php | 0 .../Strategies/Responses/ResponseCalls.php | 0 .../Responses/UseApiResourceTags.php | 0 .../Responses/UseResponseFileTag.php | 0 .../Strategies/Responses/UseResponseTag.php | 0 .../Responses/UseTransformerTags.php | 0 .../src}/Extracting/Strategies/Strategy.php | 0 .../UrlParameters/GetFromUrlParamTag.php | 0 .../src/Facades/OwnLaravelPackageTemplate.php | 13 ++ {src => Backup/src}/Http/Controller.php | 0 .../OwnLaravelPackageTemplateController.php | 13 ++ .../src}/Matching/LumenRouteAdapter.php | 0 {src => Backup/src}/Matching/RouteMatcher.php | 0 .../src}/Matching/RouteMatcher/Match.php | 0 .../src}/Matching/RouteMatcherInterface.php | 0 ...nLaravelPackageTemplateServiceProvider.php | 23 +++ .../src}/Tools/DocumentationConfig.php | 0 {src => Backup/src}/Tools/Flags.php | 0 {src => Backup/src}/Tools/Utils.php | 0 .../src}/Writing/PostmanCollectionWriter.php | 0 {src => Backup/src}/Writing/Writer.php | 0 Backup/tests/ExampleTest.php | 13 ++ .../tests}/Fixtures/TestController.php | 0 .../tests}/Fixtures/TestGroupController.php | 0 .../tests}/Fixtures/TestModel.php | 0 .../Fixtures/TestNonCommentedRequest.php | 0 .../TestPartialResourceController.php | 0 .../tests}/Fixtures/TestRequest.php | 0 .../Fixtures/TestResourceController.php | 0 .../tests}/Fixtures/TestTransformer.php | 0 {tests => Backup/tests}/Fixtures/TestUser.php | 0 .../tests}/Fixtures/TestUserApiResource.php | 0 .../TestUserApiResourceCollection.php | 0 {tests => Backup/tests}/Fixtures/append.md | 0 .../tests}/Fixtures/collection.json | 0 .../Fixtures/collection_custom_url.json | 0 .../collection_with_body_parameters.json | 0 .../collection_with_custom_headers.json | 0 .../collection_with_query_parameters.json | 0 .../Fixtures/collection_with_secure_url.json | 0 {tests => Backup/tests}/Fixtures/index.md | 0 .../tests}/Fixtures/partial_resource_index.md | 0 {tests => Backup/tests}/Fixtures/prepend.md | 0 .../tests}/Fixtures/resource_index.md | 0 .../tests}/Fixtures/response_error_test.json | 0 .../tests}/Fixtures/response_test.json | 0 .../tests}/GenerateDocumentationTest.php | 0 {tests => Backup/tests}/TestHelpers.php | 0 .../tests}/Unit/DingoGeneratorTest.php | 0 .../Unit/GeneratorPluginSystemTestCase.php | 0 .../tests}/Unit/GeneratorTestCase.php | 0 .../tests}/Unit/LaravelGeneratorTest.php | 0 .../Unit/PostmanCollectionWriterTest.php | 0 .../tests}/Unit/RouteMatcherDingoTest.php | 0 .../tests}/Unit/RouteMatcherTest.php | 0 README.md | 52 +---- composer.json | 82 ++++---- routes/web.php | 7 + src/Facades/OwnLaravelPackageTemplate.php | 13 ++ .../OwnLaravelPackageTemplateController.php | 13 ++ ...nLaravelPackageTemplateServiceProvider.php | 23 +++ tests/ExampleTest.php | 13 ++ 108 files changed, 543 insertions(+), 95 deletions(-) create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/slate-laravel-apidoc.iml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml rename .gitignore => Backup/.gitignore (100%) rename LICENSE.md => Backup/LICENSE.md (100%) create mode 100644 Backup/README.md rename body_params_1.png => Backup/body_params_1.png (100%) rename body_params_2.png => Backup/body_params_2.png (100%) create mode 100644 Backup/composer.json rename {config => Backup/config}/apidoc.php (100%) rename {docs => Backup/docs}/_index.md (100%) rename {docs => Backup/docs}/extending/_index.md (100%) rename {docs => Backup/docs}/extending/plugins.md (100%) rename {docs => Backup/docs}/getting-started/_index.md (100%) rename {docs => Backup/docs}/getting-started/configuration.md (100%) rename {docs => Backup/docs}/getting-started/documenting-your-api.md (100%) rename {docs => Backup/docs}/getting-started/generating-documentation.md (100%) rename {docs => Backup/docs}/getting-started/installation.md (100%) rename {docs => Backup/docs}/getting-started/migrating.md (100%) rename {docs => Backup/docs}/under-the-hood/_index.md (100%) rename {docs => Backup/docs}/under-the-hood/architecture.md (100%) rename {docs => Backup/docs}/under-the-hood/how-it-works.md (100%) rename phpunit.xml => Backup/phpunit.xml (100%) rename {resources => Backup/resources}/views/documentarian.blade.php (100%) rename {resources => Backup/resources}/views/partials/example-requests/bash.blade.php (100%) rename {resources => Backup/resources}/views/partials/example-requests/javascript.blade.php (100%) rename {resources => Backup/resources}/views/partials/example-requests/php.blade.php (100%) rename {resources => Backup/resources}/views/partials/example-requests/python.blade.php (100%) rename {resources => Backup/resources}/views/partials/frontmatter.blade.php (100%) rename {resources => Backup/resources}/views/partials/info.blade.php (100%) rename {resources => Backup/resources}/views/partials/route.blade.php (100%) create mode 100644 Backup/routes/laravel.php create mode 100644 Backup/routes/web.php rename {src => Backup/src}/ApiDoc.php (100%) rename {src => Backup/src}/ApiDocGeneratorServiceProvider.php (100%) rename {src => Backup/src}/Commands/GenerateDocumentation.php (100%) rename {src => Backup/src}/Commands/RebuildDocumentation.php (100%) rename {src => Backup/src}/Extracting/Generator.php (100%) rename {src => Backup/src}/Extracting/ParamHelpers.php (100%) rename {src => Backup/src}/Extracting/RouteDocBlocker.php (100%) rename {src => Backup/src}/Extracting/Strategies/BodyParameters/GetFromBodyParamTag.php (100%) rename {src => Backup/src}/Extracting/Strategies/Metadata/GetFromDocBlocks.php (100%) rename {src => Backup/src}/Extracting/Strategies/QueryParameters/GetFromQueryParamTag.php (100%) rename {src => Backup/src}/Extracting/Strategies/RequestHeaders/GetFromRouteRules.php (100%) rename {src => Backup/src}/Extracting/Strategies/Responses/ResponseCalls.php (100%) rename {src => Backup/src}/Extracting/Strategies/Responses/UseApiResourceTags.php (100%) rename {src => Backup/src}/Extracting/Strategies/Responses/UseResponseFileTag.php (100%) rename {src => Backup/src}/Extracting/Strategies/Responses/UseResponseTag.php (100%) rename {src => Backup/src}/Extracting/Strategies/Responses/UseTransformerTags.php (100%) rename {src => Backup/src}/Extracting/Strategies/Strategy.php (100%) rename {src => Backup/src}/Extracting/Strategies/UrlParameters/GetFromUrlParamTag.php (100%) create mode 100644 Backup/src/Facades/OwnLaravelPackageTemplate.php rename {src => Backup/src}/Http/Controller.php (100%) create mode 100644 Backup/src/Http/Controllers/OwnLaravelPackageTemplateController.php rename {src => Backup/src}/Matching/LumenRouteAdapter.php (100%) rename {src => Backup/src}/Matching/RouteMatcher.php (100%) rename {src => Backup/src}/Matching/RouteMatcher/Match.php (100%) rename {src => Backup/src}/Matching/RouteMatcherInterface.php (100%) create mode 100644 Backup/src/OwnLaravelPackageTemplateServiceProvider.php rename {src => Backup/src}/Tools/DocumentationConfig.php (100%) rename {src => Backup/src}/Tools/Flags.php (100%) rename {src => Backup/src}/Tools/Utils.php (100%) rename {src => Backup/src}/Writing/PostmanCollectionWriter.php (100%) rename {src => Backup/src}/Writing/Writer.php (100%) create mode 100644 Backup/tests/ExampleTest.php rename {tests => Backup/tests}/Fixtures/TestController.php (100%) rename {tests => Backup/tests}/Fixtures/TestGroupController.php (100%) rename {tests => Backup/tests}/Fixtures/TestModel.php (100%) rename {tests => Backup/tests}/Fixtures/TestNonCommentedRequest.php (100%) rename {tests => Backup/tests}/Fixtures/TestPartialResourceController.php (100%) rename {tests => Backup/tests}/Fixtures/TestRequest.php (100%) rename {tests => Backup/tests}/Fixtures/TestResourceController.php (100%) rename {tests => Backup/tests}/Fixtures/TestTransformer.php (100%) rename {tests => Backup/tests}/Fixtures/TestUser.php (100%) rename {tests => Backup/tests}/Fixtures/TestUserApiResource.php (100%) rename {tests => Backup/tests}/Fixtures/TestUserApiResourceCollection.php (100%) rename {tests => Backup/tests}/Fixtures/append.md (100%) rename {tests => Backup/tests}/Fixtures/collection.json (100%) rename {tests => Backup/tests}/Fixtures/collection_custom_url.json (100%) rename {tests => Backup/tests}/Fixtures/collection_with_body_parameters.json (100%) rename {tests => Backup/tests}/Fixtures/collection_with_custom_headers.json (100%) rename {tests => Backup/tests}/Fixtures/collection_with_query_parameters.json (100%) rename {tests => Backup/tests}/Fixtures/collection_with_secure_url.json (100%) rename {tests => Backup/tests}/Fixtures/index.md (100%) rename {tests => Backup/tests}/Fixtures/partial_resource_index.md (100%) rename {tests => Backup/tests}/Fixtures/prepend.md (100%) rename {tests => Backup/tests}/Fixtures/resource_index.md (100%) rename {tests => Backup/tests}/Fixtures/response_error_test.json (100%) rename {tests => Backup/tests}/Fixtures/response_test.json (100%) rename {tests => Backup/tests}/GenerateDocumentationTest.php (100%) rename {tests => Backup/tests}/TestHelpers.php (100%) rename {tests => Backup/tests}/Unit/DingoGeneratorTest.php (100%) rename {tests => Backup/tests}/Unit/GeneratorPluginSystemTestCase.php (100%) rename {tests => Backup/tests}/Unit/GeneratorTestCase.php (100%) rename {tests => Backup/tests}/Unit/LaravelGeneratorTest.php (100%) rename {tests => Backup/tests}/Unit/PostmanCollectionWriterTest.php (100%) rename {tests => Backup/tests}/Unit/RouteMatcherDingoTest.php (100%) rename {tests => Backup/tests}/Unit/RouteMatcherTest.php (100%) create mode 100644 routes/web.php create mode 100644 src/Facades/OwnLaravelPackageTemplate.php create mode 100644 src/Http/Controllers/OwnLaravelPackageTemplateController.php create mode 100644 src/OwnLaravelPackageTemplateServiceProvider.php create mode 100644 tests/ExampleTest.php diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..28a804d8 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..7582234b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 00000000..0062b2b1 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/slate-laravel-apidoc.iml b/.idea/slate-laravel-apidoc.iml new file mode 100644 index 00000000..aac3d051 --- /dev/null +++ b/.idea/slate-laravel-apidoc.iml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..cb2fd304 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,181 @@ + + + + + + + $PROJECT_DIR$/composer.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1726559131304 + + + 1726559176201 + + + 1726559530687 + + + 1726559688261 + + + 1726561288471 + + + 1726561577206 + + + 1726561684260 + + + 1726561865606 + + + 1726562005142 + + + 1726562156268 + + + 1726562368247 + + + 1726562451395 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.gitignore b/Backup/.gitignore similarity index 100% rename from .gitignore rename to Backup/.gitignore diff --git a/LICENSE.md b/Backup/LICENSE.md similarity index 100% rename from LICENSE.md rename to Backup/LICENSE.md diff --git a/Backup/README.md b/Backup/README.md new file mode 100644 index 00000000..f5c6ed8f --- /dev/null +++ b/Backup/README.md @@ -0,0 +1,51 @@ +## Laravel API Documentation Generator + +Automatically generate your API documentation from your existing Laravel/Lumen/[Dingo](https://github.com/dingo/api) routes. + +`php artisan apidoc:generate` + +[![Latest Stable Version](https://poser.pugx.org/mpociot/laravel-apidoc-generator/v/stable)](https://packagist.org/packages/mpociot/laravel-apidoc-generator)[![Total Downloads](https://poser.pugx.org/mpociot/laravel-apidoc-generator/downloads)](https://packagist.org/packages/mpociot/laravel-apidoc-generator) +[![License](https://poser.pugx.org/mpociot/laravel-apidoc-generator/license)](https://packagist.org/packages/mpociot/laravel-apidoc-generator) +[![codecov.io](https://codecov.io/github/mpociot/laravel-apidoc-generator/coverage.svg?branch=master)](https://codecov.io/github/mpociot/laravel-apidoc-generator?branch=master) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mpociot/laravel-apidoc-generator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mpociot/laravel-apidoc-generator/?branch=master) +[![Build Status](https://travis-ci.org/mpociot/laravel-apidoc-generator.svg?branch=master)](https://travis-ci.org/mpociot/laravel-apidoc-generator) +[![StyleCI](https://styleci.io/repos/57999295/shield?style=flat)](https://styleci.io/repos/57999295) + +## Installation +PHP 7.2 and Laravel/Lumen 5.7 or higher are required. + +> If your application does not meet these requirements, you can check out the 3.x branch for older releases. + +```sh +composer require --dev mpociot/laravel-apidoc-generator +``` + +### Laravel +Publish the config file by running: + +```bash +php artisan vendor:publish --provider="Mpociot\ApiDoc\ApiDocGeneratorServiceProvider" --tag=apidoc-config +``` + +This will create an `apidoc.php` file in your `config` folder. + +### Lumen +- When using Lumen, you will need to run `composer require mpociot/laravel-apidoc-generator` instead. +- Register the service provider in your `bootstrap/app.php`: + +```php +$app->register(\Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class); +``` + +- Copy the config file from `vendor/mpociot/laravel-apidoc-generator/config/apidoc.php` to your project as `config/apidoc.php`. Then add to your `bootstrap/app.php`: + +```php +$app->configure('apidoc'); +``` + +## Documentation +Check out the documentation at the [Beyond Code homepage](https://beyondco.de/docs/laravel-apidoc-generator/). + +### License + +The Laravel API Documentation Generator is free software licensed under the MIT license. diff --git a/body_params_1.png b/Backup/body_params_1.png similarity index 100% rename from body_params_1.png rename to Backup/body_params_1.png diff --git a/body_params_2.png b/Backup/body_params_2.png similarity index 100% rename from body_params_2.png rename to Backup/body_params_2.png diff --git a/Backup/composer.json b/Backup/composer.json new file mode 100644 index 00000000..3c15e6ae --- /dev/null +++ b/Backup/composer.json @@ -0,0 +1,46 @@ +{ + "name": "simonsraz/slate-laravel-apidoc", + "license": "MIT", + "description": "Generate beautiful API documentation from your Laravel application", + "keywords": [ + "API", + "Documentation", + "Laravel" + ], + "homepage": "http://github.com/mpociot/laravel-apidoc-generator", + "authors": [ + { + "name": "Marcel Pociot", + "email": "m.pociot@gmail.com" + } + ], + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/simonsraz/slate-laravel-apidoc" + } + ], + "minimum-stability": "dev", + "prefer-stable": true, + "require": { + "php": "^8.0", + "illuminate/support": "^10.0" + }, + "autoload": { + "psr-4": { + "Mpociot\\ApiDoc\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Mpociot\\ApiDoc\\Tests\\": "tests/" + } + }, + "extra": { + "laravel": { + "providers": [ + "Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider" + ] + } + } +} diff --git a/config/apidoc.php b/Backup/config/apidoc.php similarity index 100% rename from config/apidoc.php rename to Backup/config/apidoc.php diff --git a/docs/_index.md b/Backup/docs/_index.md similarity index 100% rename from docs/_index.md rename to Backup/docs/_index.md diff --git a/docs/extending/_index.md b/Backup/docs/extending/_index.md similarity index 100% rename from docs/extending/_index.md rename to Backup/docs/extending/_index.md diff --git a/docs/extending/plugins.md b/Backup/docs/extending/plugins.md similarity index 100% rename from docs/extending/plugins.md rename to Backup/docs/extending/plugins.md diff --git a/docs/getting-started/_index.md b/Backup/docs/getting-started/_index.md similarity index 100% rename from docs/getting-started/_index.md rename to Backup/docs/getting-started/_index.md diff --git a/docs/getting-started/configuration.md b/Backup/docs/getting-started/configuration.md similarity index 100% rename from docs/getting-started/configuration.md rename to Backup/docs/getting-started/configuration.md diff --git a/docs/getting-started/documenting-your-api.md b/Backup/docs/getting-started/documenting-your-api.md similarity index 100% rename from docs/getting-started/documenting-your-api.md rename to Backup/docs/getting-started/documenting-your-api.md diff --git a/docs/getting-started/generating-documentation.md b/Backup/docs/getting-started/generating-documentation.md similarity index 100% rename from docs/getting-started/generating-documentation.md rename to Backup/docs/getting-started/generating-documentation.md diff --git a/docs/getting-started/installation.md b/Backup/docs/getting-started/installation.md similarity index 100% rename from docs/getting-started/installation.md rename to Backup/docs/getting-started/installation.md diff --git a/docs/getting-started/migrating.md b/Backup/docs/getting-started/migrating.md similarity index 100% rename from docs/getting-started/migrating.md rename to Backup/docs/getting-started/migrating.md diff --git a/docs/under-the-hood/_index.md b/Backup/docs/under-the-hood/_index.md similarity index 100% rename from docs/under-the-hood/_index.md rename to Backup/docs/under-the-hood/_index.md diff --git a/docs/under-the-hood/architecture.md b/Backup/docs/under-the-hood/architecture.md similarity index 100% rename from docs/under-the-hood/architecture.md rename to Backup/docs/under-the-hood/architecture.md diff --git a/docs/under-the-hood/how-it-works.md b/Backup/docs/under-the-hood/how-it-works.md similarity index 100% rename from docs/under-the-hood/how-it-works.md rename to Backup/docs/under-the-hood/how-it-works.md diff --git a/phpunit.xml b/Backup/phpunit.xml similarity index 100% rename from phpunit.xml rename to Backup/phpunit.xml diff --git a/resources/views/documentarian.blade.php b/Backup/resources/views/documentarian.blade.php similarity index 100% rename from resources/views/documentarian.blade.php rename to Backup/resources/views/documentarian.blade.php diff --git a/resources/views/partials/example-requests/bash.blade.php b/Backup/resources/views/partials/example-requests/bash.blade.php similarity index 100% rename from resources/views/partials/example-requests/bash.blade.php rename to Backup/resources/views/partials/example-requests/bash.blade.php diff --git a/resources/views/partials/example-requests/javascript.blade.php b/Backup/resources/views/partials/example-requests/javascript.blade.php similarity index 100% rename from resources/views/partials/example-requests/javascript.blade.php rename to Backup/resources/views/partials/example-requests/javascript.blade.php diff --git a/resources/views/partials/example-requests/php.blade.php b/Backup/resources/views/partials/example-requests/php.blade.php similarity index 100% rename from resources/views/partials/example-requests/php.blade.php rename to Backup/resources/views/partials/example-requests/php.blade.php diff --git a/resources/views/partials/example-requests/python.blade.php b/Backup/resources/views/partials/example-requests/python.blade.php similarity index 100% rename from resources/views/partials/example-requests/python.blade.php rename to Backup/resources/views/partials/example-requests/python.blade.php diff --git a/resources/views/partials/frontmatter.blade.php b/Backup/resources/views/partials/frontmatter.blade.php similarity index 100% rename from resources/views/partials/frontmatter.blade.php rename to Backup/resources/views/partials/frontmatter.blade.php diff --git a/resources/views/partials/info.blade.php b/Backup/resources/views/partials/info.blade.php similarity index 100% rename from resources/views/partials/info.blade.php rename to Backup/resources/views/partials/info.blade.php diff --git a/resources/views/partials/route.blade.php b/Backup/resources/views/partials/route.blade.php similarity index 100% rename from resources/views/partials/route.blade.php rename to Backup/resources/views/partials/route.blade.php diff --git a/Backup/routes/laravel.php b/Backup/routes/laravel.php new file mode 100644 index 00000000..64ffb592 --- /dev/null +++ b/Backup/routes/laravel.php @@ -0,0 +1,13 @@ +middleware($middleware) + ->group(function () use ($prefix) { + Route::get($prefix, 'Controller@html')->name('apidoc'); + Route::get("$prefix.json", 'Controller@json')->name('apidoc.json'); + }); diff --git a/Backup/routes/web.php b/Backup/routes/web.php new file mode 100644 index 00000000..b5a90002 --- /dev/null +++ b/Backup/routes/web.php @@ -0,0 +1,7 @@ +loadRoutesFrom(__DIR__.'/../routes/web.php'); + + // If the package provides any views + // $this->loadViewsFrom(__DIR__.'/../resources/views', 'yourpackage'); + + } +} diff --git a/src/Tools/DocumentationConfig.php b/Backup/src/Tools/DocumentationConfig.php similarity index 100% rename from src/Tools/DocumentationConfig.php rename to Backup/src/Tools/DocumentationConfig.php diff --git a/src/Tools/Flags.php b/Backup/src/Tools/Flags.php similarity index 100% rename from src/Tools/Flags.php rename to Backup/src/Tools/Flags.php diff --git a/src/Tools/Utils.php b/Backup/src/Tools/Utils.php similarity index 100% rename from src/Tools/Utils.php rename to Backup/src/Tools/Utils.php diff --git a/src/Writing/PostmanCollectionWriter.php b/Backup/src/Writing/PostmanCollectionWriter.php similarity index 100% rename from src/Writing/PostmanCollectionWriter.php rename to Backup/src/Writing/PostmanCollectionWriter.php diff --git a/src/Writing/Writer.php b/Backup/src/Writing/Writer.php similarity index 100% rename from src/Writing/Writer.php rename to Backup/src/Writing/Writer.php diff --git a/Backup/tests/ExampleTest.php b/Backup/tests/ExampleTest.php new file mode 100644 index 00000000..f50d6c3d --- /dev/null +++ b/Backup/tests/ExampleTest.php @@ -0,0 +1,13 @@ +assertTrue(true); + } +} diff --git a/tests/Fixtures/TestController.php b/Backup/tests/Fixtures/TestController.php similarity index 100% rename from tests/Fixtures/TestController.php rename to Backup/tests/Fixtures/TestController.php diff --git a/tests/Fixtures/TestGroupController.php b/Backup/tests/Fixtures/TestGroupController.php similarity index 100% rename from tests/Fixtures/TestGroupController.php rename to Backup/tests/Fixtures/TestGroupController.php diff --git a/tests/Fixtures/TestModel.php b/Backup/tests/Fixtures/TestModel.php similarity index 100% rename from tests/Fixtures/TestModel.php rename to Backup/tests/Fixtures/TestModel.php diff --git a/tests/Fixtures/TestNonCommentedRequest.php b/Backup/tests/Fixtures/TestNonCommentedRequest.php similarity index 100% rename from tests/Fixtures/TestNonCommentedRequest.php rename to Backup/tests/Fixtures/TestNonCommentedRequest.php diff --git a/tests/Fixtures/TestPartialResourceController.php b/Backup/tests/Fixtures/TestPartialResourceController.php similarity index 100% rename from tests/Fixtures/TestPartialResourceController.php rename to Backup/tests/Fixtures/TestPartialResourceController.php diff --git a/tests/Fixtures/TestRequest.php b/Backup/tests/Fixtures/TestRequest.php similarity index 100% rename from tests/Fixtures/TestRequest.php rename to Backup/tests/Fixtures/TestRequest.php diff --git a/tests/Fixtures/TestResourceController.php b/Backup/tests/Fixtures/TestResourceController.php similarity index 100% rename from tests/Fixtures/TestResourceController.php rename to Backup/tests/Fixtures/TestResourceController.php diff --git a/tests/Fixtures/TestTransformer.php b/Backup/tests/Fixtures/TestTransformer.php similarity index 100% rename from tests/Fixtures/TestTransformer.php rename to Backup/tests/Fixtures/TestTransformer.php diff --git a/tests/Fixtures/TestUser.php b/Backup/tests/Fixtures/TestUser.php similarity index 100% rename from tests/Fixtures/TestUser.php rename to Backup/tests/Fixtures/TestUser.php diff --git a/tests/Fixtures/TestUserApiResource.php b/Backup/tests/Fixtures/TestUserApiResource.php similarity index 100% rename from tests/Fixtures/TestUserApiResource.php rename to Backup/tests/Fixtures/TestUserApiResource.php diff --git a/tests/Fixtures/TestUserApiResourceCollection.php b/Backup/tests/Fixtures/TestUserApiResourceCollection.php similarity index 100% rename from tests/Fixtures/TestUserApiResourceCollection.php rename to Backup/tests/Fixtures/TestUserApiResourceCollection.php diff --git a/tests/Fixtures/append.md b/Backup/tests/Fixtures/append.md similarity index 100% rename from tests/Fixtures/append.md rename to Backup/tests/Fixtures/append.md diff --git a/tests/Fixtures/collection.json b/Backup/tests/Fixtures/collection.json similarity index 100% rename from tests/Fixtures/collection.json rename to Backup/tests/Fixtures/collection.json diff --git a/tests/Fixtures/collection_custom_url.json b/Backup/tests/Fixtures/collection_custom_url.json similarity index 100% rename from tests/Fixtures/collection_custom_url.json rename to Backup/tests/Fixtures/collection_custom_url.json diff --git a/tests/Fixtures/collection_with_body_parameters.json b/Backup/tests/Fixtures/collection_with_body_parameters.json similarity index 100% rename from tests/Fixtures/collection_with_body_parameters.json rename to Backup/tests/Fixtures/collection_with_body_parameters.json diff --git a/tests/Fixtures/collection_with_custom_headers.json b/Backup/tests/Fixtures/collection_with_custom_headers.json similarity index 100% rename from tests/Fixtures/collection_with_custom_headers.json rename to Backup/tests/Fixtures/collection_with_custom_headers.json diff --git a/tests/Fixtures/collection_with_query_parameters.json b/Backup/tests/Fixtures/collection_with_query_parameters.json similarity index 100% rename from tests/Fixtures/collection_with_query_parameters.json rename to Backup/tests/Fixtures/collection_with_query_parameters.json diff --git a/tests/Fixtures/collection_with_secure_url.json b/Backup/tests/Fixtures/collection_with_secure_url.json similarity index 100% rename from tests/Fixtures/collection_with_secure_url.json rename to Backup/tests/Fixtures/collection_with_secure_url.json diff --git a/tests/Fixtures/index.md b/Backup/tests/Fixtures/index.md similarity index 100% rename from tests/Fixtures/index.md rename to Backup/tests/Fixtures/index.md diff --git a/tests/Fixtures/partial_resource_index.md b/Backup/tests/Fixtures/partial_resource_index.md similarity index 100% rename from tests/Fixtures/partial_resource_index.md rename to Backup/tests/Fixtures/partial_resource_index.md diff --git a/tests/Fixtures/prepend.md b/Backup/tests/Fixtures/prepend.md similarity index 100% rename from tests/Fixtures/prepend.md rename to Backup/tests/Fixtures/prepend.md diff --git a/tests/Fixtures/resource_index.md b/Backup/tests/Fixtures/resource_index.md similarity index 100% rename from tests/Fixtures/resource_index.md rename to Backup/tests/Fixtures/resource_index.md diff --git a/tests/Fixtures/response_error_test.json b/Backup/tests/Fixtures/response_error_test.json similarity index 100% rename from tests/Fixtures/response_error_test.json rename to Backup/tests/Fixtures/response_error_test.json diff --git a/tests/Fixtures/response_test.json b/Backup/tests/Fixtures/response_test.json similarity index 100% rename from tests/Fixtures/response_test.json rename to Backup/tests/Fixtures/response_test.json diff --git a/tests/GenerateDocumentationTest.php b/Backup/tests/GenerateDocumentationTest.php similarity index 100% rename from tests/GenerateDocumentationTest.php rename to Backup/tests/GenerateDocumentationTest.php diff --git a/tests/TestHelpers.php b/Backup/tests/TestHelpers.php similarity index 100% rename from tests/TestHelpers.php rename to Backup/tests/TestHelpers.php diff --git a/tests/Unit/DingoGeneratorTest.php b/Backup/tests/Unit/DingoGeneratorTest.php similarity index 100% rename from tests/Unit/DingoGeneratorTest.php rename to Backup/tests/Unit/DingoGeneratorTest.php diff --git a/tests/Unit/GeneratorPluginSystemTestCase.php b/Backup/tests/Unit/GeneratorPluginSystemTestCase.php similarity index 100% rename from tests/Unit/GeneratorPluginSystemTestCase.php rename to Backup/tests/Unit/GeneratorPluginSystemTestCase.php diff --git a/tests/Unit/GeneratorTestCase.php b/Backup/tests/Unit/GeneratorTestCase.php similarity index 100% rename from tests/Unit/GeneratorTestCase.php rename to Backup/tests/Unit/GeneratorTestCase.php diff --git a/tests/Unit/LaravelGeneratorTest.php b/Backup/tests/Unit/LaravelGeneratorTest.php similarity index 100% rename from tests/Unit/LaravelGeneratorTest.php rename to Backup/tests/Unit/LaravelGeneratorTest.php diff --git a/tests/Unit/PostmanCollectionWriterTest.php b/Backup/tests/Unit/PostmanCollectionWriterTest.php similarity index 100% rename from tests/Unit/PostmanCollectionWriterTest.php rename to Backup/tests/Unit/PostmanCollectionWriterTest.php diff --git a/tests/Unit/RouteMatcherDingoTest.php b/Backup/tests/Unit/RouteMatcherDingoTest.php similarity index 100% rename from tests/Unit/RouteMatcherDingoTest.php rename to Backup/tests/Unit/RouteMatcherDingoTest.php diff --git a/tests/Unit/RouteMatcherTest.php b/Backup/tests/Unit/RouteMatcherTest.php similarity index 100% rename from tests/Unit/RouteMatcherTest.php rename to Backup/tests/Unit/RouteMatcherTest.php diff --git a/README.md b/README.md index f5c6ed8f..bf7002c8 100644 --- a/README.md +++ b/README.md @@ -1,51 +1 @@ -## Laravel API Documentation Generator - -Automatically generate your API documentation from your existing Laravel/Lumen/[Dingo](https://github.com/dingo/api) routes. - -`php artisan apidoc:generate` - -[![Latest Stable Version](https://poser.pugx.org/mpociot/laravel-apidoc-generator/v/stable)](https://packagist.org/packages/mpociot/laravel-apidoc-generator)[![Total Downloads](https://poser.pugx.org/mpociot/laravel-apidoc-generator/downloads)](https://packagist.org/packages/mpociot/laravel-apidoc-generator) -[![License](https://poser.pugx.org/mpociot/laravel-apidoc-generator/license)](https://packagist.org/packages/mpociot/laravel-apidoc-generator) -[![codecov.io](https://codecov.io/github/mpociot/laravel-apidoc-generator/coverage.svg?branch=master)](https://codecov.io/github/mpociot/laravel-apidoc-generator?branch=master) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mpociot/laravel-apidoc-generator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mpociot/laravel-apidoc-generator/?branch=master) -[![Build Status](https://travis-ci.org/mpociot/laravel-apidoc-generator.svg?branch=master)](https://travis-ci.org/mpociot/laravel-apidoc-generator) -[![StyleCI](https://styleci.io/repos/57999295/shield?style=flat)](https://styleci.io/repos/57999295) - -## Installation -PHP 7.2 and Laravel/Lumen 5.7 or higher are required. - -> If your application does not meet these requirements, you can check out the 3.x branch for older releases. - -```sh -composer require --dev mpociot/laravel-apidoc-generator -``` - -### Laravel -Publish the config file by running: - -```bash -php artisan vendor:publish --provider="Mpociot\ApiDoc\ApiDocGeneratorServiceProvider" --tag=apidoc-config -``` - -This will create an `apidoc.php` file in your `config` folder. - -### Lumen -- When using Lumen, you will need to run `composer require mpociot/laravel-apidoc-generator` instead. -- Register the service provider in your `bootstrap/app.php`: - -```php -$app->register(\Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class); -``` - -- Copy the config file from `vendor/mpociot/laravel-apidoc-generator/config/apidoc.php` to your project as `config/apidoc.php`. Then add to your `bootstrap/app.php`: - -```php -$app->configure('apidoc'); -``` - -## Documentation -Check out the documentation at the [Beyond Code homepage](https://beyondco.de/docs/laravel-apidoc-generator/). - -### License - -The Laravel API Documentation Generator is free software licensed under the MIT license. +# own-laravel-package-template \ No newline at end of file diff --git a/composer.json b/composer.json index 3c15e6ae..0b668d39 100644 --- a/composer.json +++ b/composer.json @@ -1,46 +1,40 @@ { - "name": "simonsraz/slate-laravel-apidoc", - "license": "MIT", - "description": "Generate beautiful API documentation from your Laravel application", - "keywords": [ - "API", - "Documentation", - "Laravel" - ], - "homepage": "http://github.com/mpociot/laravel-apidoc-generator", - "authors": [ - { - "name": "Marcel Pociot", - "email": "m.pociot@gmail.com" - } - ], - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/simonsraz/slate-laravel-apidoc" - } - ], - "minimum-stability": "dev", - "prefer-stable": true, - "require": { - "php": "^8.0", - "illuminate/support": "^10.0" - }, - "autoload": { - "psr-4": { - "Mpociot\\ApiDoc\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Mpociot\\ApiDoc\\Tests\\": "tests/" - } - }, - "extra": { - "laravel": { - "providers": [ - "Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider" - ] - } - } + "name": "simonsraz/own-laravel-package-template", + "description": "A minimal Laravel package", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Simon S Raz", + "email": "info@rezzentech.com" + } + ], + "require": { + "php": "^8.0", + "illuminate/support": "^10.0", + "simonsraz/own-laravel-package-template": "dev-master" + }, + "autoload": { + "psr-4": { + "Simonsraz\\OwnLaravelPackageTemplate\\": "src/" + } + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/simonsraz/own-laravel-package-template.git" + } + ], + "extra": { + "laravel": { + "providers": [ + "Simonsraz\\OwnLaravelPackageTemplate\\OwnLaravelPackageTemplateServiceProvider" + ], + "aliases": { + "YourPackage": "Simonsraz\\OwnLaravelPackageTemplate\\Facades\\OwnlaravelPackageTemplate" + } + } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/routes/web.php b/routes/web.php new file mode 100644 index 00000000..b5a90002 --- /dev/null +++ b/routes/web.php @@ -0,0 +1,7 @@ +loadRoutesFrom(__DIR__.'/../routes/web.php'); + + // If the package provides any views + // $this->loadViewsFrom(__DIR__.'/../resources/views', 'yourpackage'); + + } +} diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php new file mode 100644 index 00000000..f50d6c3d --- /dev/null +++ b/tests/ExampleTest.php @@ -0,0 +1,13 @@ +assertTrue(true); + } +}