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

org.apache.juneau.oapi.annotation.OpenApiConfig Maven / Gradle / Ivy

// ***************************************************************************************************************************
// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
// * to you 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.apache.juneau.oapi.annotation;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

import java.lang.annotation.*;

import org.apache.juneau.annotation.*;
import org.apache.juneau.httppart.*;
import org.apache.juneau.msgpack.*;

/**
 * Annotation for specifying config properties defined in {@link MsgPackSerializer} and {@link MsgPackParser}.
 *
 * 

* Used primarily for specifying bean configuration properties on REST classes and methods. * *

See Also:
*/ @Target({TYPE,METHOD}) @Retention(RUNTIME) @Inherited @ContextApply({OpenApiConfigAnnotation.SerializerApply.class,OpenApiConfigAnnotation.ParserApply.class}) public @interface OpenApiConfig { /** * Optional rank for this config. * *

* Can be used to override default ordering and application of config annotations. * * @return The annotation value. */ int rank() default 0; //------------------------------------------------------------------------------------------------------------------- // OpenApiCommon //------------------------------------------------------------------------------------------------------------------- /** * Default format for HTTP parts. * *

* Specifies the format to use for HTTP parts when not otherwise specified via {@link org.apache.juneau.annotation.Schema#format()}. * *

    *
  • {@link HttpPartFormat} *
      *
    • {@link HttpPartFormat#UON UON} - UON notation (e.g. "'foo bar'"). *
    • {@link HttpPartFormat#INT32 INT32} - Signed 32 bits. *
    • {@link HttpPartFormat#INT64 INT64} - Signed 64 bits. *
    • {@link HttpPartFormat#FLOAT FLOAT} - 32-bit floating point number. *
    • {@link HttpPartFormat#DOUBLE DOUBLE} - 64-bit floating point number. *
    • {@link HttpPartFormat#BYTE BYTE} - BASE-64 encoded characters. *
    • {@link HttpPartFormat#BINARY BINARY} - Hexadecimal encoded octets (e.g. "00FF"). *
    • {@link HttpPartFormat#BINARY_SPACED BINARY_SPACED} - Spaced-separated hexadecimal encoded octets (e.g. "00 FF"). *
    • {@link HttpPartFormat#DATE DATE} - An RFC3339 full-date. *
    • {@link HttpPartFormat#DATE_TIME DATE_TIME} - An RFC3339 date-time. *
    • {@link HttpPartFormat#PASSWORD PASSWORD} - Used to hint UIs the input needs to be obscured. *
    • {@link HttpPartFormat#NO_FORMAT NO_FORMAT} - (default) Not specified. *
    *
* *
See Also:
    *
  • {@link org.apache.juneau.oapi.OpenApiSerializer.Builder#format(HttpPartFormat)} *
  • {@link org.apache.juneau.oapi.OpenApiParser.Builder#format(HttpPartFormat)} *
* * @return The annotation value. */ String format() default ""; /** * Default collection format for HTTP parts. * *

* Specifies the collection format to use for HTTP parts when not otherwise specified via {@link org.apache.juneau.annotation.Schema#collectionFormat()}. * *

    *
  • {@link HttpPartCollectionFormat} *
      *
    • {@link HttpPartCollectionFormat#CSV CSV} - (default) Comma-separated values (e.g. "foo,bar"). *
    • {@link HttpPartCollectionFormat#SSV SSV} - Space-separated values (e.g. "foo bar"). *
    • {@link HttpPartCollectionFormat#TSV TSV} - Tab-separated values (e.g. "foo\tbar"). *
    • {@link HttpPartCollectionFormat#PIPES PIPES} - Pipe-separated values (e.g. "foo|bar"). *
    • {@link HttpPartCollectionFormat#MULTI MULTI} - Corresponds to multiple parameter instances instead of multiple values for a single instance (e.g. "foo=bar&foo=baz"). *
    • {@link HttpPartCollectionFormat#UONC UONC} - UON collection notation (e.g. "@(foo,bar)"). *
    *
* *
See Also:
    *
  • {@link org.apache.juneau.oapi.OpenApiSerializer.Builder#collectionFormat(HttpPartCollectionFormat)} *
  • {@link org.apache.juneau.oapi.OpenApiParser.Builder#collectionFormat(HttpPartCollectionFormat)} *
* * @return The annotation value. */ String collectionFormat() default ""; //------------------------------------------------------------------------------------------------------------------- // OpenApiSerializer //------------------------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------------------------- // OpenApiParser //------------------------------------------------------------------------------------------------------------------- }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy