Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
npm run generate:server:version --oas-version=pr-134 (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Jul 19, 2021
1 parent 7a76f4a commit c96fcdc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
2. Run the [openapi-generator] using the new ROCC OpenAPI
specification.
`npm run generate:server:version --oas-version=${{
`npm run generate:server:version --schemas-version=${{
env.NEW_VERSION }}`
3. Review the updates made to this tool in the [ROCC schemas
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"generate:server": "openapi-generator-cli generate -g python-flask -o server -i $npm_config_specification",
"generate:server:latest": "openapi-generator-cli generate -g python-flask -o server -i https://sage-bionetworks.github.io/rocc-schemas/latest/openapi.json",
"generate:server:edge": "openapi-generator-cli generate -g python-flask -o server -i https://sage-bionetworks.github.io/rocc-schemas/edge/openapi.json",
"generate:server:version": "openapi-generator-cli generate -g python-flask -o server -i https://sage-bionetworks.github.io/rocc-schemas/${npm_config_oas_version}/openapi.json",
"generate:server:version": "openapi-generator-cli generate -g python-flask -o server -i https://sage-bionetworks.github.io/rocc-schemas/${npm_config_schemas_version}/openapi.json",
"lint": "cd server && flake8",
"test": "cd server && tox",
"install:dependencies": "npm ci && cd server && pip install -r requirements.txt",
Expand Down
70 changes: 35 additions & 35 deletions server/openapi_server/models/date_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ class DateRange(Model):
Do not edit the class manually.
"""

def __init__(self, start_date=None, end_date=None): # noqa: E501
def __init__(self, start=None, end=None): # noqa: E501
"""DateRange - a model defined in OpenAPI
:param start_date: The start_date of this DateRange. # noqa: E501
:type start_date: date
:param end_date: The end_date of this DateRange. # noqa: E501
:type end_date: date
:param start: The start of this DateRange. # noqa: E501
:type start: date
:param end: The end of this DateRange. # noqa: E501
:type end: date
"""
self.openapi_types = {
'start_date': date,
'end_date': date
'start': date,
'end': date
}

self.attribute_map = {
'start_date': 'startDate',
'end_date': 'endDate'
'start': 'start',
'end': 'end'
}

self._start_date = start_date
self._end_date = end_date
self._start = start
self._end = end

@classmethod
def from_dict(cls, dikt) -> 'DateRange':
Expand All @@ -48,51 +48,51 @@ def from_dict(cls, dikt) -> 'DateRange':
return util.deserialize_model(dikt, cls)

@property
def start_date(self):
"""Gets the start_date of this DateRange.
def start(self):
"""Gets the start of this DateRange.
Start date of the date range # noqa: E501
:return: The start_date of this DateRange.
:return: The start of this DateRange.
:rtype: date
"""
return self._start_date
return self._start

@start_date.setter
def start_date(self, start_date):
"""Sets the start_date of this DateRange.
@start.setter
def start(self, start):
"""Sets the start of this DateRange.
Start date of the date range # noqa: E501
:param start_date: The start_date of this DateRange.
:type start_date: date
:param start: The start of this DateRange.
:type start: date
"""
if start_date is None:
raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501
if start is None:
raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501

self._start_date = start_date
self._start = start

@property
def end_date(self):
"""Gets the end_date of this DateRange.
def end(self):
"""Gets the end of this DateRange.
End date of the date range # noqa: E501
:return: The end_date of this DateRange.
:return: The end of this DateRange.
:rtype: date
"""
return self._end_date
return self._end

@end_date.setter
def end_date(self, end_date):
"""Sets the end_date of this DateRange.
@end.setter
def end(self, end):
"""Sets the end of this DateRange.
End date of the date range # noqa: E501
:param end_date: The end_date of this DateRange.
:type end_date: date
:param end: The end of this DateRange.
:type end: date
"""
if end_date is None:
raise ValueError("Invalid value for `end_date`, must not be `None`") # noqa: E501
if end is None:
raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501

self._end_date = end_date
self._end = end
12 changes: 6 additions & 6 deletions server/openapi_server/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1727,20 +1727,20 @@ components:
type: string
DateRange:
example:
startDate: 2021-07-17
endDate: 2021-07-17
start: 2021-07-17
end: 2021-07-17
properties:
startDate:
start:
description: Start date of the date range
format: date
type: string
endDate:
end:
description: End date of the date range
format: date
type: string
required:
- endDate
- startDate
- end
- start
title: DateRange
type: object
ResponsePageMetadata:
Expand Down

0 comments on commit c96fcdc

Please sign in to comment.