article_draft_operation.api 2.0 KB

syntax = "v1"

info(
    title: "xx实例"
    desc: "xx实例"
    author: "author"
    email: "email"
    version: "v1"
)

@server(
    prefix: article_draft_operation/v1
    group: article_draft_operation
    jwt: JwtAuth
)
service Core {
    @handler getArticleDraftOperation
    post /article_draft_operation/:id (ArticleDraftOperationGetRequest) returns (ArticleDraftOperationGetResponse)
    @handler saveArticleDraftOperation
    post /article_draft_operation (ArticleDraftOperationSaveRequest) returns (ArticleDraftOperationSaveResponse)
    @handler deleteArticleDraftOperation
    delete /article_draft_operation/:id (ArticleDraftOperationDeleteRequest) returns (ArticleDraftOperationDeleteResponse)
    @handler updateArticleDraftOperation
    put /article_draft_operation/:id (ArticleDraftOperationUpdateRequest) returns (ArticleDraftOperationUpdateResponse)
    @handler searchArticleDraftOperation
    post /article_draft_operation/search (ArticleDraftOperationSearchRequest) returns (ArticleDraftOperationSearchResponse)
}

type (
    ArticleDraftOperationGetRequest {
		Id int64 `path:"id"`
	}
    ArticleDraftOperationGetResponse struct{
		ArticleDraftOperation ArticleDraftOperationItem `json:"article_draft_operation"`
    }

	ArticleDraftOperationSaveRequest struct{
		ArticleDraftOperation ArticleDraftOperationItem `json:"article_draft_operation"`
    }
    ArticleDraftOperationSaveResponse struct{}

	ArticleDraftOperationDeleteRequest struct{
        Id int64 `path:"id"`
    }
    ArticleDraftOperationDeleteResponse struct{}

	ArticleDraftOperationUpdateRequest struct{
		Id int64 `path:"id"`
        ArticleDraftOperation ArticleDraftOperationItem `json:"article_draft_operation"`
    }
    ArticleDraftOperationUpdateResponse struct{}

 	ArticleDraftOperationSearchRequest struct{
         Page int  `json:"page"`
         Size int  `json:"size"`
    }
    ArticleDraftOperationSearchResponse{
        List []ArticleDraftOperationItem  `json:"list"`
        Total int64 `json:"total"`
    }
	ArticleDraftOperationItem struct{
	
	}
)