mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 19:06:26 +00:00
9a6d3d33a4
* Add initial api docs using drf-spectacular This commit adds the inital and basic docs using drf-spectacular. It also adds some serializers to be used for automatically generating response objects by drf-spectacular * Update api docs with correct request and response objects - TODO: /order route * Fix typo in api docs * Separate OpenAPI schemas into it's own file * Update drf-spectacular and add API intro and logo * Update API docs for GET /order * Add api docs for POST /order route * Update serializers.py
24 lines
992 B
Python
24 lines
992 B
Python
from django.urls import path
|
|
from .views import MakerView, OrderView, UserView, BookView, InfoView, RewardView, PriceView, LimitView, HistoricalView, TickView, StealthView
|
|
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
|
|
|
|
urlpatterns = [
|
|
path('schema/', SpectacularAPIView.as_view(), name='schema'),
|
|
path('', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
|
|
path("make/", MakerView.as_view()),
|
|
path("order/",OrderView.as_view({
|
|
"get": "get",
|
|
"post": "take_update_confirm_dispute_cancel"
|
|
}),
|
|
),
|
|
path("user/", UserView.as_view()),
|
|
path("book/", BookView.as_view()),
|
|
path("info/", InfoView.as_view()),
|
|
path("price/", PriceView.as_view()),
|
|
path("limits/", LimitView.as_view()),
|
|
path("reward/", RewardView.as_view()),
|
|
path("historical/", HistoricalView.as_view()),
|
|
path("ticks/", TickView.as_view()),
|
|
path("stealth/", StealthView.as_view()),
|
|
]
|