- New explicit versioning schema
- Recommend
swagger.json
/swagger.yaml
are now calledopenapi.json
/openapi.yaml
- Switch from Github Flavoured Markdown syntax to CommonMark syntax
- New top-level construct
Components
holds a set of objects to be reused throught the rest of the API. This allows us to define re-used things in one place and reference them, instead of repeating them. Will be especially useful for error responses, pagination parameters, etc - New
info.servers
construct replacesbasePath
. This may allow us to combine all of our separate Open API specs into one, mega spec. - Ability to specify a path parameter at the top level (i.e. no need to duplicate the definition of
{policy_uuid}
for theGET
,PATCH
,PUT
andDELETE
endpoints) - Moving of request BODY parameters into their own part of the path definition
- Support for different request BODY definitions based on the Content-Type of the request (e.g. we could make one API support both JSON and YAML)
- Support for different r
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
{ | |
"basics": { | |
"name": "Richard Hendriks", | |
"label": "Programmer", | |
"picture": "http://www.piedpiper.com/app/themes/pied-piper/dist/images/richard.png", | |
"email": "richard.hendriks@piedpiper.com", | |
"phone": "(912) 555-4321", | |
"website": "http://piedpiper.com", | |
"summary": "Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. (Go Sooners and Cardinals!) Before starting Pied Piper, he worked for Hooli as a part time software developer. While his work focuses on applied information theory, mostly optimizing lossless compression schema of both the length-limited and adaptive variants, his non-work interests range widely, everything from quantum computing to chaos theory. He could tell you about it, but THAT would NOT be a “length-limited” conversation!", | |
"location": { |
This file has been truncated, but you can view the full file.
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
craig@amogato2:/tmp/ppp | |
$ pipenv install --python `which python3.6` | |
Creating a virtualenv for this project... | |
Pipfile: /private/tmp/ppp/Pipfile | |
Using /Users/craig/.pyenv/shims/python3.6 (3.6.6) to create virtualenv... | |
⠋Running virtualenv with interpreter /Users/craig/.pyenv/shims/python3.6 | |
Using base prefix '/Users/craig/.pyenv/versions/3.6.6' | |
New python executable in /Users/craig/.virtualenvs/ppp-VkRNbFgf/bin/python3.6 | |
Also creating executable in /Users/craig/.virtualenvs/ppp-VkRNbFgf/bin/python | |
Installing setuptools, pip, wheel...done. |
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
{ | |
"Outputs": { | |
"ClioutputApigatewayFirstappSampleApi": { | |
"Value": { | |
"Fn::Join": [ | |
"", | |
[ | |
"https://", | |
{ | |
"Ref": "FirstappSampleApi" |
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
[distutils] | |
index-servers = | |
pypi | |
[pypi] | |
repository: https://pypi.python.org/pypi | |
username: jakul | |
password: XXXXXXXXXX | |
[pypitest] |
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
### Tox | |
Symlink `.tox` to a folder on the virtual machine to make it run faster / at all | |
### Symlinks | |
Boot machine from windows with `vagrant up` in a shell with ** ADMINISTRATOR ** privledges to enable symlinking | |
Enable symlinks on shared folders by adding the following to `Vagrantfile` | |
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] | |
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/src2", "1"] |
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
window.addSessions = function() { | |
nl.Store.sessionsCollection.add({'id': 1, 'practice_id': 1, status: 'posted', date: moment('2014-08-18T11:48:08Z'), date_posted: moment('2014-06-12T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 2, 'practice_id': 2, status: 'posted', date: moment('2014-08-25T10:48:08Z'), date_posted: moment('2014-06-13T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 3, 'practice_id': 1, status: 'posted', date: moment('2014-08-19T10:48:08Z'), date_posted: moment('2014-06-11T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 4, 'practice_id': 1, status: 'posted', date: moment('2014-08-18T10:48:08Z'), date_posted: moment('2014-06-06T10:48:08Z'), partapplications: [{'a': 1}]}); | |
nl.Store.sessionsCollection.add({'id': 5, 'practice_id': 1, status: 'posted', date: moment('2014-08-18T10:48:08Z'), date_posted: moment('2014-06-09T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 6, 'practice_id': 2, status: 'posted', date: moment( |
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
from jobs.models import * | |
import datetime | |
starts_on = datetime.date(2014,1,1) | |
# Update all ongoing jobs which don't have pays_pension but should | |
jobs = Job.objects.filter(status__in=[Job.STATUS_POSTED, Job.STATUS_FILLED, Job.STATUS_STARTED], pays_pension='').exclude(practice__pays_pension='') | |
for job in jobs: | |
job.pays_pension = job.practice.pays_pension | |
job.save() |
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
# A batch function which does the ordering and sends an announcement with (all) the ordered job ids in | |
# A function receives that announcment and processes the first job from that list | |
# Each processed job needs to know | |
# * the number of invites sent for that job today | |
# * the number of invites sent to each locum today | |
# While the job doesn't have enough invitations | |
# While there are locums to try to match | |
# Sum up the number of sent invites for this locum and hte number of potential invites waiting to be sent and exit if that number is too high | |
# Try to match the locum to job | |
# Create entry in mongo if the locum matches |
NewerOlder