View Source OpenAPI.Renderer.File (OpenAPI Generator v0.1.0-rc.0)
Collection of operations and schemas that belong to the same file
As rendering occurs for a particular file, this struct will collect all of the necessary data to continue the process. It has the following fields:
ast
: Once rendered, the Abstract Syntax Tree (AST), or quoted form, of the file contents. This AST may include additional formatting-related metadata.contents
: Once formatted, theiodata
form of the file contents. This is what will be used by the default implementation of the write callback.location
: Once determined, the filesystem location (path) where the file is intended to be written.module
: Name of the Elixir module contained in the file.operations
: List ofOpenAPI.Processor.Operation.t/0
contained in the file.schemas
: List ofOpenAPI.Processor.Schema.t/0
contained in the file.
All of this state is managed by the code generator, so it is unlikely that callbacks would need to write to this struct directly.
Link to this section Summary
Link to this section Types
@type t() :: %OpenAPI.Renderer.File{ ast: Macro.t() | nil, contents: iodata() | nil, location: String.t() | nil, module: module(), operations: [OpenAPI.Processor.Operation.t()], schemas: [OpenAPI.Processor.Schema.t()] }
File contents
See module documentation for additional information.