improve mesh api v2 documentation
This commit is contained in:
parent
0d9dc4f8db
commit
c21c43a6da
2 changed files with 10 additions and 8 deletions
|
@ -155,7 +155,7 @@ def hole_list(request, filters: Query[SpaceGeometryFilter]):
|
|||
return mapdata_list_endpoint(request, model=Hole, filters=filters)
|
||||
|
||||
|
||||
@mapdata_api_router.get('/holes/{hole_id}/', summary="hole by id",
|
||||
@mapdata_api_router.get('/holes/{hole_id}/', summary="hole by ID",
|
||||
response={200: HoleSchema, **API404.dict(), **auth_responses})
|
||||
@newapi_etag()
|
||||
def hole_by_id(request, hole_id: int):
|
||||
|
|
|
@ -71,7 +71,7 @@ class FirmwareSchema(Schema):
|
|||
return builds
|
||||
|
||||
|
||||
@mesh_api_router.get('/firmwares/', summary="List available firmwares",
|
||||
@mesh_api_router.get('/firmwares/', summary="firmware list",
|
||||
response={200: list[FirmwareSchema], **validate_responses, **auth_responses},
|
||||
openapi_extra={"security": [{"APITokenAuth": ["mesh_control"]}]})
|
||||
@paginate
|
||||
|
@ -79,7 +79,7 @@ def firmware_list(request):
|
|||
return FirmwareVersion.objects.all()
|
||||
|
||||
|
||||
@mesh_api_router.get('/firmwares/{firmware_id}/', summary="Get specific firmware",
|
||||
@mesh_api_router.get('/firmwares/{firmware_id}/', summary="firmware by ID",
|
||||
response={200: FirmwareSchema, **API404.dict(), **auth_responses},
|
||||
openapi_extra={"security": [{"APITokenAuth": ["mesh_control"]}]})
|
||||
def firmware_by_id(request, firmware_id: int):
|
||||
|
@ -90,7 +90,8 @@ def firmware_by_id(request, firmware_id: int):
|
|||
|
||||
|
||||
@mesh_api_router.get('/firmwares/{firmware_id}/{variant}/image_data',
|
||||
summary="Get header data of firmware build image",
|
||||
summary="firmware image header",
|
||||
description="get firmware image header for specific firmware build",
|
||||
response={200: FirmwareImage.schema, **API404.dict(), **auth_responses},
|
||||
openapi_extra={
|
||||
"externalDocs": {
|
||||
|
@ -109,7 +110,8 @@ def firmware_build_image(request, firmware_id: int, variant: str):
|
|||
|
||||
|
||||
@mesh_api_router.get('/firmwares/{firmware_id}/{variant}/project_description',
|
||||
summary="Get project description of firmware build",
|
||||
summary="firmware project description",
|
||||
description="get the project description json file generated during the build process",
|
||||
response={200: dict, **API404.dict(), **auth_responses},
|
||||
openapi_extra={
|
||||
"externalDocs": {
|
||||
|
@ -153,8 +155,7 @@ class UploadFirmwareSchema(Schema):
|
|||
|
||||
|
||||
@mesh_api_router.post(
|
||||
'/firmwares/upload', summary="Upload firmware",
|
||||
description="your OpenAPI viewer might not show it: firmware_data is UploadFirmware as json",
|
||||
'/firmwares/upload', summary="upload firmware",
|
||||
response={200: FirmwareSchema, **validate_responses, **auth_permission_responses, **APIConflict.dict()},
|
||||
openapi_extra={"security": [{"APITokenAuth": ["mesh_control", "write"]}]}
|
||||
)
|
||||
|
@ -224,7 +225,8 @@ class NodeMessageSchema(Schema):
|
|||
|
||||
|
||||
@mesh_api_router.get(
|
||||
'/messages/', summary="query recorded mesh messages",
|
||||
'/messages/', summary="mesh messages list",
|
||||
description="query and filter all received mesh messages",
|
||||
response={200: list[NodeMessageSchema], **auth_permission_responses},
|
||||
openapi_extra={"security": [{"APITokenAuth": ["mesh_control"]}]}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue