Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added schema definitions, responses, support to JWT auth, Swagger UI and Docker environment #24

Merged
merged 60 commits into from
Feb 17, 2020
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1b7f7b2
chore: adds docker container with php7.4
Jan 17, 2020
aa4fe6c
feat: adds generator to swagger definitions section
Jan 17, 2020
d9f6b04
style: removes extra "\" from test routes definitions
Jan 17, 2020
0d8fe42
feat: changes php version according to travis ci definitions
Jan 17, 2020
d257c3b
refactor: adds action extraction methods to Route class
Jan 20, 2020
605958d
refactor: obtains model relations from helper instead of class
Jan 20, 2020
fb2482a
refactor: disables generate definition example
Jan 20, 2020
71c1b4f
refactor: changes model extraction from Generator to Route
Jan 20, 2020
9ae6f11
feat: adds generator to success and error responses
Jan 20, 2020
833a448
feat: adds definitions and responses to generated docs
Jan 20, 2020
ba07e5a
docs: adds docs to generate definitions and responses
Jan 20, 2020
6c82814
docs: updates docs details
Jan 20, 2020
805dddd
feat: adds factory to generate example field on parameters.
Jan 21, 2020
947efec
feat: fixes form request name class extraction
Jan 21, 2020
f979832
feat: adds view to show swagger docs
Jan 21, 2020
ebce3da
feat: adds swagger ui dependency
Jan 21, 2020
23e6c82
feat: adds swagger ui route and view
Jan 22, 2020
7d6aec3
test: adds tests to GenerateSwaggerDocCommand
Jan 22, 2020
75d59ad
refactor: changes to filter routes before generate docs
Jan 22, 2020
5e11250
docs: changes generate swagger command usage
Jan 22, 2020
e6ee2bc
feat: adds routes versions to swagger ui view
Jan 22, 2020
36ddef3
feat: adds select to choose api version on Swagger UI
Jan 23, 2020
c90c3fc
feat: adds method to route return form request from params
Jan 23, 2020
ed5a2ad
feat: adds errors response generation with laravel defaults responses
Jan 23, 2020
2029b79
feat: adds cast to array on get throws from route docblock
Jan 23, 2020
bd7637c
feat: adds handlers to generate definitions to error responses
Jan 24, 2020
c7d5e4f
fix: fixes to create one definition for each form request
Jan 24, 2020
404da85
chore: adds xdebug to Dockerfile
Jan 24, 2020
1a8e175
test: adds tests to return of getAppends method
Jan 24, 2020
8f825f0
feat: throws exception when response has no definition configured
Jan 24, 2020
56a4658
test: adds test when find not existent version
Jan 24, 2020
f82c559
feat: adds swagger file name generator to make it more automatic
Jan 27, 2020
0c5979c
fix: fixes definition generation when has no model defined
Jan 27, 2020
91ed0b5
style: fixes return type from getModel method
Jan 27, 2020
f109f0c
fix: fixes check model on success response generator
Jan 27, 2020
1ac2f44
feat: adds jwt security definitions generator
Jan 28, 2020
2a2cfb6
fix: fixes to get all middleware registered for action
Jan 29, 2020
29d3b44
test: adds test for route
Jan 29, 2020
3e11718
fix: removes output parameter from command
Jan 29, 2020
81365ca
feat: add trait to use when the model has appends
Jan 29, 2020
83492bc
docs: adds info and examples how to use the laravel swagger
Jan 29, 2020
ea54419
test: fixes passport routes calling
Jan 30, 2020
5716e27
chore: adds docker-sync to improve performance on mac
sfelix-martins Jan 30, 2020
a99a9d4
chore: adds gitattributes
sfelix-martins Jan 30, 2020
8d87fee
feat: changes parseSecurity and parseDocsBlock from version to global
sfelix-martins Feb 5, 2020
5e25242
feat: removes param --all-versions from command
sfelix-martins Feb 5, 2020
ea2a76e
refactor: changes the model annotation obtaining
sfelix-martins Feb 5, 2020
344187d
refactor: changes getActionClassInstance to use action from $this
sfelix-martins Feb 5, 2020
b8ee2e7
refactor: removes alias to check if can generate definitions
sfelix-martins Feb 5, 2020
c6e83a0
refactor: removes not required filter to check if allows generate
sfelix-martins Feb 5, 2020
2964244
conflict fix
mtrajano Feb 7, 2020
bad6685
moved configs around for better versioning
mtrajano Feb 9, 2020
316215d
more clean up and tests
mtrajano Feb 10, 2020
46a4254
more fixes and tests
mtrajano Feb 10, 2020
0ab8825
relations logic do not call method before checking return typehint
mtrajano Feb 12, 2020
dd5e5e6
test: changes to assert example is not empty instead of just null
sfelix-martins Feb 12, 2020
9f8aa0b
config for parsing relationships and example data, disable by default
mtrajano Feb 13, 2020
511eda6
Merge branch 'master' of github.com:coopersystem-fsd/laravel-swagger …
mtrajano Feb 13, 2020
428989e
fixed documentation
mtrajano Feb 17, 2020
77b52ce
skipping flaky tests for now
mtrajano Feb 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* text=auto

/.github export-ignore
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.styleci.yml export-ignore
.travis.yml export-ignore
docker-compose.yml export-ignore
docker-sync.yml export-ignore
Dockerfile export-ignore
phpunit.xml export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
vendor/
.phpunit.result.cache
.idea
.docker-sync

report
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: php

php:
- 7.1
- 7.2
- 7.3
- 7.4
Expand Down
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM php:7.4.1-fpm-alpine

RUN apk update
RUN apk add --no-cache openssl bash

RUN apk add --no-cache $PHPIZE_DEPS \
&& pecl install xdebug-2.9.1 \
&& docker-php-ext-enable xdebug

ADD . /var/www
RUN chown -R www-data:www-data /var/www

# Add a non-root user to prevent files being created with root permissions on host machine.
ENV USER=laravel
ENV UID 1000
ENV GID 1000

RUN addgroup --gid "$GID" "$USER" \
&& adduser \
--disabled-password \
--gecos "" \
--home "$(pwd)" \
--ingroup "$USER" \
--no-create-home \
--uid "$UID" \
"$USER"

WORKDIR /var/www

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

EXPOSE 80
ENTRYPOINT ["php-fpm"]
Loading