001/** 002 * Copyright (c) 2015-2022, Michael Yang 杨福海 (fuhai999@gmail.com). 003 * <p> 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * <p> 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * <p> 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package io.jboot.apidoc.annotation; 017 018import io.jboot.apidoc.ContentType; 019 020import java.lang.annotation.*; 021 022@Inherited 023@Retention(RetentionPolicy.RUNTIME) 024@Target({ElementType.METHOD}) 025public @interface ApiOper { 026 027 /** 028 * 标题 029 * 030 * @return 031 */ 032 String value(); 033 034 /** 035 * 描述 036 * 037 * @return 038 */ 039 String notes() default ""; 040 041 /** 042 * 参数描述 043 * 044 * @return 045 */ 046 String paraNotes() default ""; 047 048 /** 049 * Http 的 Content-Type 050 * 051 * @return 052 */ 053 ContentType contentType() default ContentType.DEFAULT; 054 055 /** 056 * 生成文档的排序 057 * 058 * @return 059 */ 060 int orderNo() default 0; 061 062 063 /** 064 * 对于某些没有返回值(void)的方法,其调用其他方法渲染数据时,可以通过其设置顶级的类 比如 Ret 或者 Map 之类的 065 * 066 * @return 067 */ 068 Class<?> containerClass() default void.class; 069 070 071}