Class OpenApiUtils


  • public final class OpenApiUtils
    extends java.lang.Object
    • Method Detail

      • getSpecificationExtensionName

        public static java.lang.String getSpecificationExtensionName​(ShapeId metaTraitId,
                                                                     SpecificationExtensionTrait specificationExtensionTrait)
        Gets the specification extension name for a given meta trait. Either an explicitly configured extension name in specificationExtensionTrait, or a normalization of the shape ID. The normalization replaces all "." and "#" in a shapeId to "-".
        Parameters:
        metaTraitId - Trait shape to get the extension name.
        Returns:
        Extension name for the given trait shape.
      • getSpecificationExtensionsMap

        public static java.util.Map<java.lang.String,​Node> getSpecificationExtensionsMap​(Model model,
                                                                                               Shape shape)
        Return specification extensions attached to a given shape.
        Parameters:
        shape - Shape to get extensions for.
        model - Model the shape belongs to.
        Returns:
        map of specification extension names to node values