All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.microprofile.openapi.annotations.parameters.RequestBody Maven / Gradle / Ivy

There is a newer version: 4.0.2
Show newest version
/**
 * Copyright (c) 2017 Contributors to the Eclipse Foundation
 * Copyright 2017 SmartBear Software
 * 

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *

* http://www.apache.org/licenses/LICENSE-2.0 *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.eclipse.microprofile.openapi.annotations.parameters; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.eclipse.microprofile.openapi.annotations.media.Content; /** * Describes a single request body. * * @see requestBody Object **/ @Target({ ElementType.PARAMETER, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface RequestBody { /** * A brief description of the request body. *

* This could contain examples of use. * CommonMark syntax MAY be used for rich text representation. *

* @return description of this requestBody instance **/ String description() default ""; /** * The content of the request body. It is a REQUIRED property unless this is only a reference to a request body instance. * * @return content of this requestBody instance **/ Content[] content() default {}; /** * Determines if the request body is required in the request. * * @return whether or not this requestBody is required **/ boolean required() default false; /** * The unique name to identify this request body. Unless this annotation is used on the actual request body parameter, * it is required to match the name of that parameter so the appropriate association can be made. When the request body * is defined within {@link org.eclipse.microprofile.openapi.annotations.Components}. The name will be used as the key to * add this request body to the 'requestBodies' map for reuse. * * @return this request body's name **/ String name() default ""; /** * Reference value to a RequestBody object. *

* This property provides a reference to an object defined elsewhere. This property and * all other properties are mutually exclusive. If other properties are defined in addition * to the ref property then the result is undefined. * * @return reference to a request body **/ String ref() default ""; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy