001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.http.annotation; 014 015import static java.lang.annotation.RetentionPolicy.*; 016 017import java.lang.annotation.*; 018 019/** 020 * Swagger contact annotation. 021 * 022 * <p> 023 * The contact information for the exposed API. 024 * 025 * <p> 026 * Used to populate the auto-generated Swagger documentation and UI for server-side <ja>@Rest</ja>-annotated classes. 027 * 028 * <h5 class='section'>Example:</h5> 029 * <p class='bjava'> 030 * <ja>@Swagger</ja>( 031 * contact=<ja>@Contact</ja>( 032 * name=<js>"Juneau Development Team"</js>, 033 * email=<js>"dev@juneau.apache.org"</js>, 034 * url=<js>"http://juneau.apache.org"</js> 035 * ) 036 * ) 037 * </p> 038 * 039 * <h5 class='section'>See Also:</h5><ul> 040 * <li class='link'><a class="doclink" href="../../../../../index.html#jrs.Swagger">Swagger</a> 041 * <li class='extlink'><a class="doclink" href="https://swagger.io/specification/v2#contactObject">Swagger Contact Object</a> 042 043 * </ul> 044 */ 045@Documented 046@Retention(RUNTIME) 047public @interface Contact { 048 049 /** 050 * <mk>email</mk> field of the <a class="doclink" href="https://swagger.io/specification/v2#contactObject">Swagger Contact Object</a>. 051 * 052 * <p> 053 * The email address of the contact person/organization. MUST be in the format of an email address. 054 * 055 * <h5 class='section'>Notes:</h5><ul> 056 * <li class='note'> 057 * The format is an email string. 058 * <li class='note'> 059 * Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a> (e.g. <js>"$L{my.localized.variable}"</js>) for the swagger generator. 060 * </ul> 061 * 062 * @return The annotation value. 063 */ 064 String email() default ""; 065 066 /** 067 * <mk>name</mk> field of the <a class="doclink" href="https://swagger.io/specification/v2#contactObject">Swagger Contact Object</a>. 068 * 069 * <p> 070 * The identifying name of the contact person/organization. 071 * 072 * <h5 class='section'>Notes:</h5><ul> 073 * <li class='note'> 074 * The format is a plain-text string. 075 * <li class='note'> 076 * Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a> (e.g. <js>"$L{my.localized.variable}"</js>) for the swagger generator. 077 * </ul> 078 * 079 * @return The annotation value. 080 */ 081 String name() default ""; 082 083 /** 084 * <mk>url</mk> field of the <a class="doclink" href="https://swagger.io/specification/v2#contactObject">Swagger Contact Object</a>. 085 * 086 * <p> 087 * The URL pointing to the contact information. MUST be in the format of a URL. 088 * 089 * <h5 class='section'>Notes:</h5><ul> 090 * <li class='note'> 091 * The format is a URL string. 092 * <li class='note'> 093 * Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a> 094 * (e.g. <js>"$L{my.localized.variable}"</js>). 095 * </ul> 096 * 097 * @return The annotation value. 098 */ 099 String url() default ""; 100}