Parser
Each supported input format uses the Parser interface. Parsers are pure: the
same input bytes always produce the same IR.
Built-in parsers:
- OpenAPI 3.x / Swagger 2.0
- AsyncAPI JSON/YAML documents
- Protobuf message and service definitions
- gRPC service declarations
- Postman Collection v2.1
- HAR (HTTP Archive)
- GraphQL schema (experimental)
- Recorded traffic (via
carbon record)
Custom parsers can be registered in the SDK:
import { ParserRegistry } from '@carbon/parser';
const registry = new ParserRegistry() .register(new OpenApiParser()) .register(new MyCustomParser());