mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
Refactor API specs latest
This commit is contained in:
parent
9405125edf
commit
62c189ebcf
@ -1,5 +1,5 @@
|
|||||||
<redoc
|
<redoc
|
||||||
spec-url='/assets/schemas/api-v0.5.3.yaml'
|
spec-url='/assets/schemas/api-latest.yaml'
|
||||||
expand-responses='200,201'
|
expand-responses='200,201'
|
||||||
theme='{
|
theme='{
|
||||||
"colors": {
|
"colors": {
|
@ -5,7 +5,7 @@ permalink: /docs/api/
|
|||||||
sidebar:
|
sidebar:
|
||||||
title: '<img id="side-icon-verybig" src="/assets/vector/cloud.svg"/>API'
|
title: '<img id="side-icon-verybig" src="/assets/vector/cloud.svg"/>API'
|
||||||
nav: docs
|
nav: docs
|
||||||
src: "_pages/docs/03-understand/11-api-v0.5.3.md"
|
src: "_pages/docs/03-understand/11-api-latest.md"
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include api-v0.5.3.html %}
|
{% include api-latest.html %}
|
2013
docs/assets/schemas/api-latest.yaml
Normal file
2013
docs/assets/schemas/api-latest.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,13 +7,13 @@ from rest_framework.test import APITestCase
|
|||||||
# Update api specs to the newest from a running django server (if any)
|
# Update api specs to the newest from a running django server (if any)
|
||||||
try:
|
try:
|
||||||
urllib.request.urlretrieve(
|
urllib.request.urlretrieve(
|
||||||
"http://127.0.0.1:8000/api/schema", "tests/api_specs.yaml"
|
"http://127.0.0.1:8000/api/schema", "docs/assets/schemas/api-latest.yaml"
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Could not fetch current API specs: {e}")
|
print(f"Could not fetch latests API specs: {e}")
|
||||||
print("Using previously existing api_specs.yaml definitions")
|
print("Using previously existing api-latest.yaml definitions from docs")
|
||||||
|
|
||||||
schema_tester = SchemaTester(schema_file_path="tests/api_specs.yaml")
|
schema_tester = SchemaTester(schema_file_path="docs/assets/schemas/api-latest.yaml")
|
||||||
|
|
||||||
|
|
||||||
class BaseAPITestCase(APITestCase):
|
class BaseAPITestCase(APITestCase):
|
||||||
|
Loading…
Reference in New Issue
Block a user