Package ru.yojo.codegen.parser
Class AsyncAPIParser
java.lang.Object
ru.yojo.codegen.parser.AsyncAPIParser
Parses an AsyncAPI specification file and extracts all schemas, messages, and metadata
needed for Java DTO generation.
Handles:
- YAML loading and validation
components.schemasandcomponents.messagesextraction- Recursive external
$refresolution - Message resolution from channels (AsyncAPI 2.x) or operations (AsyncAPI 3.x)
- YAML preprocessing for inline name/package injection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionParses an AsyncAPI specification file and returns a structured result.
-
Constructor Details
-
AsyncAPIParser
public AsyncAPIParser()
-
-
Method Details
-
parse
public ParseResult parse(Path specFilePath, Path baseDir, String packageLocation) throws IOException Parses an AsyncAPI specification file and returns a structured result.- Parameters:
specFilePath- absolute path to the spec filebaseDir- base directory for resolving relative$refpathspackageLocation- base package (e.g.,"com.example")- Returns:
- structured parse result
- Throws:
IOException- if the spec file cannot be readIllegalArgumentException- if the file is not a root AsyncAPI/OpenAPI spec
-