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.HttpMethod;
019
020import java.lang.annotation.*;
021
022@Inherited
023@Retention(RetentionPolicy.RUNTIME)
024@Target({ElementType.METHOD, ElementType.PARAMETER})
025public @interface ApiPara {
026
027    /**
028     * 标题
029     *
030     * @return
031     */
032    String value();
033
034    /**
035     * 参数名称
036     *
037     * @return
038     */
039    String name() default "";
040
041    /**
042     * 描述
043     *
044     * @return
045     */
046    String notes() default "";
047
048    /**
049     * 数据类型
050     *
051     * @return
052     */
053    Class<?> dataType() default void.class;
054
055    /**
056     * 要求通过哪些方法传入,比如只能通过 post 传入
057     *
058     * @return
059     */
060    HttpMethod[] method() default {};
061    
062    /**
063     * 是否必填
064     * @return
065     */
066    boolean require() default false;
067}