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

org.apache.juneau.rest.config.BasicOpenApiConfig 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.rest.config;

import org.apache.juneau.annotation.*;
import org.apache.juneau.oapi.*;
import org.apache.juneau.rest.annotation.*;
import org.apache.juneau.serializer.annotation.*;

/**
 * Basic configuration for a REST resource that supports OpenAPI transport.
 *
 * 

* Default settings defined: *

*
    *
  • {@link Rest}: *
      *
    • {@link Rest#serializers() serializers}: *
        *
      • {@link OpenApiSerializer} *
      *
    • *
    • {@link Rest#parsers() parsers}: *
        *
      • {@link OpenApiParser} *
      *
    • *
    • {@link Rest#defaultAccept() defaultAccept}: "text/openapi" *
    • {@link Rest#config() config}: "$S{juneau.configFile,SYSTEM_DEFAULT}" *
    *
  • *
  • {@link BeanConfig}: *
      *
    • {@link BeanConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: "true" *
    *
  • *
  • {@link SerializerConfig}: *
      *
    • {@link SerializerConfig#uriResolution() uriResolution}: "ROOT_RELATIVE" *
    *
  • *
* *

* This annotation can be applied to REST resource classes to define common OpenAPI default configurations: *

*

* // Used on a top-level resource. * @Rest * public class MyResource extends RestServlet implements BasicOpenApiConfig { ... } *

*

* // Used on a child resource. * @Rest * public class MyResource extends RestObject implements BasicOpenApiConfig { ... } *

* *

* Note that the framework will aggregate annotations defined on all classes in the class hierarchy with * values defined on child classes overriding values defined on parent classes. That allows any values defined * on this interface to be overridden by annotations defined on the implemented class. *

* *
See Also:
*/ @Rest( // Default serializers for all Java methods in the class. serializers={ OpenApiSerializer.class, }, // Default parsers for all Java methods in the class. parsers={ OpenApiParser.class, }, defaultAccept="text/openapi" ) public interface BasicOpenApiConfig extends DefaultConfig {}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy