Class RefResolver

java.lang.Object
io.asyncapi.generator.codegen.RefResolver

public class RefResolver extends Object
Resolves JSON/YAML local $ref pointers within an AsyncAPI document.
  • Constructor Details

  • Method Details

    • resolve

      public Map<String,Object> resolve(String ref)
      Resolves "#/path/to/thing" within the document root.
    • resolveIfRef

      public Map<String,Object> resolveIfRef(Map<String,Object> obj)
      If the map contains "$ref", resolve it; otherwise return the map itself.
    • nameFromRef

      public static String nameFromRef(String ref)
      Extracts the terminal name from a $ref path. "#/components/messages/UserSignedUp" → "UserSignedUp"
    • asMap

      public static Map<String,Object> asMap(Object obj)