Class MergeUtil


  • public class MergeUtil
    extends Object
    Used to merge OAI data models into a single one. The MP+OAI 1.0 spec requires that any or all of the various mechanisms for producing an OAI document can be used. When more than one mechanism is used, each mechanism produces an OpenAPI document. These multiple documents must then be sensibly merged into a final result.
    Author:
    [email protected]
    • Method Detail

      • merge

        public static final org.eclipse.microprofile.openapi.models.OpenAPI merge​(org.eclipse.microprofile.openapi.models.OpenAPI document1,
                                                                                  org.eclipse.microprofile.openapi.models.OpenAPI document2)
        Merges documents and returns the result.
        Parameters:
        document1 - OpenAPIImpl instance
        document2 - OpenAPIImpl instance
        Returns:
        Merged OpenAPIImpl instance
      • mergeObjects

        public static <T> T mergeObjects​(T object1,
                                         T object2)
        Generic merge of two objects of the same type.
        Type Parameters:
        T - Type parameter
        Parameters:
        object1 - First object
        object2 - Second object
        Returns:
        Merged object