mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
21 lines
727 B
Python
21 lines
727 B
Python
from project.api import add_api_resource
|
|
from flask_apispec import marshal_with, doc
|
|
from flask_apispec.views import MethodResource
|
|
from project.api.schemas import NoneSchema
|
|
from project.api.dump.schemas import DumpResponseSchema
|
|
|
|
|
|
class DumpResource(MethodResource):
|
|
@doc(
|
|
summary="Dump model definition",
|
|
description="Always returns 404 because the endpoint is just for response definition of the dump data file. Go to the developers page to learn how to download the dump data file.",
|
|
tags=["Dump"],
|
|
)
|
|
@marshal_with(NoneSchema, 404)
|
|
@marshal_with(DumpResponseSchema, 200)
|
|
def get(self, **kwargs):
|
|
return None, 404
|
|
|
|
|
|
add_api_resource(DumpResource, "/dump", "api_v1_dump")
|