-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6400 from fossasia/development
chore: Release v1.6.0
- Loading branch information
Showing
139 changed files
with
27,826 additions
and
26,122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ before-install: | |
- npm -g install npm@latest | ||
|
||
install: | ||
- npm install -g [email protected] | ||
- npm install -g aglio | ||
- npm install -g [email protected] | ||
- pip3 install -r requirements/tests.txt | ||
|
||
env: | ||
|
@@ -30,6 +31,7 @@ before_script: | |
- export DATABASE_URL=postgresql://postgres@localhost:5432/test | ||
- export TEST_DATABASE_URL=postgresql://postgres@localhost:5432/test | ||
- bash scripts/test_multiple_heads.sh | ||
- aglio --input docs/api/api_blueprint_source.apib --compile --output docs/api/api_blueprint.apib | ||
- dredd | ||
|
||
script: | ||
|
@@ -38,3 +40,8 @@ script: | |
after_success: | ||
- 'bash <(curl -s https://codecov.io/bash)' | ||
- bash scripts/push_api_docs.sh | ||
|
||
branches: | ||
only: | ||
- master | ||
- development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship | ||
from app.models import db | ||
from app.api.schema.custom_form_options import CustomFormOptionSchema | ||
from app.models.custom_form_option import CustomFormOptions | ||
|
||
|
||
class CustomFormOptionList(ResourceList): | ||
""" | ||
Create and List Custom Form Options | ||
""" | ||
|
||
def query(self, view_kwargs): | ||
query_ = self.session.query(CustomFormOptions) | ||
if view_kwargs.get('custom_form_id'): | ||
query_ = self.session.query(CustomFormOptions).filter( | ||
getattr(CustomFormOptions, 'custom_form_id') == view_kwargs['custom_form_id']) | ||
return query_ | ||
|
||
schema = CustomFormOptionSchema | ||
data_layer = {'session': db.session, | ||
'model': CustomFormOptions, | ||
'methods': { | ||
'query': query | ||
}} | ||
|
||
|
||
class CustomFormOptionDetail(ResourceDetail): | ||
""" | ||
CustomForm Resource | ||
""" | ||
|
||
schema = CustomFormOptionSchema | ||
data_layer = {'session': db.session, | ||
'model': CustomFormOptions | ||
} | ||
|
||
|
||
class CustomFormOptionRelationship(ResourceRelationship): | ||
""" | ||
CustomForm Resource | ||
""" | ||
|
||
schema = CustomFormOptionSchema | ||
data_layer = {'session': db.session, | ||
'model': CustomFormOptions | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.