-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change redoc/openapi paths to point to versioned api * Remove /api prefix * Regenerate client
- Loading branch information
Showing
10 changed files
with
220 additions
and
207 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 |
---|---|---|
|
@@ -37,7 +37,7 @@ Create a local-only test user with: | |
curl -H "Content-Type: application/json" \ | ||
--request POST \ | ||
--data '{"email": "[email protected]", "password_plain": "test", "secret_token": "00123456789==" }' \ | ||
http://localhost:8080/api/v1/auth/users/register | ||
http://localhost:8080/v1/auth/users/register | ||
``` | ||
|
||
The response should be just `null` and there should be no errors in the api container. | ||
|
@@ -68,15 +68,15 @@ Build images and run contains: | |
|
||
Create user: | ||
|
||
`curl -H "Content-Type: application/json" --request POST --data '{"email": "[email protected]", "password_plain": "test", "secret_token": "00123456789==" }' http://localhost:8080/api/v1/auth/users/register` | ||
`curl -H "Content-Type: application/json" --request POST --data '{"email": "[email protected]", "password_plain": "test", "secret_token": "00123456789==" }' http://localhost:8080/v1/auth/users/register` | ||
|
||
Get auth token | ||
|
||
`curl -H "Content-Type: application/x-www-form-urlencoded" --request POST --data '[email protected]&password=test' http://localhost:8080/api/v1/auth/token` | ||
`curl -H "Content-Type: application/x-www-form-urlencoded" --request POST --data '[email protected]&password=test' http://localhost:8080/v1/auth/token` | ||
|
||
Copy auth token which you can then use to make calls to the api. E.g. create a study: | ||
|
||
`curl -H "Content-Type: application/json" -H "Authorization: Bearer <auth token>" --request POST http://localhost:8080/api/v1/private/studies -d @study_input.json` | ||
`curl -H "Content-Type: application/json" -H "Authorization: Bearer <auth token>" --request POST http://localhost:8080/v1/private/studies -d @study_input.json` | ||
|
||
You should be able to make your changes & can rebuild the api image with the command: | ||
|
||
|
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
Oops, something went wrong.