-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #578 from open5e/openapi_schema_definition
Openapi schema definition
- Loading branch information
Showing
10 changed files
with
22,688 additions
and
3,726 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from rest_framework import routers | ||
from django.conf.urls import include | ||
from django.urls import path | ||
|
||
from api import views | ||
|
||
router = routers.DefaultRouter() | ||
router.register(r'manifest', views.ManifestViewSet) | ||
router.register(r'spells', views.SpellViewSet) | ||
router.register(r'spelllist',views.SpellListViewSet) | ||
router.register(r'monsters', views.MonsterViewSet) | ||
router.register(r'documents', views.DocumentViewSet) | ||
router.register(r'backgrounds', views.BackgroundViewSet) | ||
router.register(r'planes', views.PlaneViewSet) | ||
router.register(r'sections', views.SectionViewSet) | ||
router.register(r'feats', views.FeatViewSet) | ||
router.register(r'conditions', views.ConditionViewSet) | ||
router.register(r'races',views.RaceViewSet) | ||
router.register(r'classes',views.CharClassViewSet) | ||
router.register(r'magicitems',views.MagicItemViewSet) | ||
router.register(r'weapons',views.WeaponViewSet) | ||
router.register(r'armor',views.ArmorViewSet) | ||
|
||
urlpatterns = [ | ||
path('', include(router.urls)), #Consider removing this after a while. | ||
path('version/', views.get_version, name="version"), | ||
path('v1/', include(router.urls)) | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from django.conf.urls import include | ||
from django.urls import path | ||
from rest_framework import routers | ||
|
||
from api_v2 import views | ||
|
||
router = routers.DefaultRouter() | ||
router.register(r'items',views.ItemViewSet) | ||
router.register(r'itemsets',views.ItemSetViewSet) | ||
router.register(r'itemcategories',views.ItemCategoryViewSet) | ||
router.register(r'documents',views.DocumentViewSet) | ||
router.register(r'licenses',views.LicenseViewSet) | ||
router.register(r'publishers',views.PublisherViewSet) | ||
router.register(r'weapons',views.WeaponViewSet) | ||
router.register(r'armor',views.ArmorViewSet) | ||
router.register(r'gamesystems',views.GameSystemViewSet) | ||
router.register(r'backgrounds',views.BackgroundViewSet) | ||
router.register(r'feats',views.FeatViewSet) | ||
router.register(r'races',views.RaceViewSet) | ||
router.register(r'creatures',views.CreatureViewSet) | ||
router.register(r'creaturetypes',views.CreatureTypeViewSet) | ||
router.register(r'creaturesets',views.CreatureSetViewSet) | ||
router.register(r'damagetypes',views.DamageTypeViewSet) | ||
router.register(r'languages',views.LanguageViewSet) | ||
router.register(r'alignments',views.AlignmentViewSet) | ||
router.register(r'conditions',views.ConditionViewSet) | ||
router.register(r'spells',views.SpellViewSet) | ||
router.register(r'classes',views.CharacterClassViewSet) | ||
router.register(r'sizes',views.SizeViewSet) | ||
router.register(r'itemrarities',views.ItemRarityViewSet) | ||
router.register(r'environments',views.EnvironmentViewSet) | ||
router.register(r'abilities',views.AbilityViewSet) | ||
router.register(r'skills',views.SkillViewSet) | ||
router.register(r'rules', views.RuleViewSet) | ||
router.register(r'rulesets', views.RuleSetViewSet) | ||
|
||
search_router = routers.DefaultRouter() | ||
search_router.register('',views.SearchResultViewSet, basename='search') | ||
|
||
urlpatterns = [ | ||
path('v2/', include(router.urls)), | ||
path('v2/search/', include(search_router.urls)), | ||
path('v2/enums/', views.get_enums, name="enums") | ||
] |
Oops, something went wrong.