Class OpenApiUtils


public final class OpenApiUtils extends Object
  • Method Details

    • getSpecificationExtensionName

      public static 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 "-".
      metaTraitId - Trait shape to get the extension name.
      Extension name for the given trait shape.
    • getSpecificationExtensionsMap

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