Class OpenApiUtils

java.lang.Object
software.amazon.smithy.openapi.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 "-".
      Parameters:
      metaTraitId - Trait shape to get the extension name.
      Returns:
      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.
      Parameters:
      shape - Shape to get extensions for.
      model - Model the shape belongs to.
      Returns:
      map of specification extension names to node values