We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a record for Bbands Params:
{ "type" : "record", "name" : "BbandsParams", "namespace" : "dapp.kasirka", "fields" : [ { "name" : "maType", "type" : "int", "default" : 0 }, { "name" : "nbDevUp", "type" : "int", "default" : 0 }, { "name" : "nbDevDn", "type" : "int", "default" : 0 } ] }
And and output object BbandsOutput, which has BbandsParams as one of it's fields.
{ "type" : "record", "name" : "BbandsOutput", "namespace" : "dapp.kasirka", "fields" : [ { "name" : "params", "type" : { "type" : "record", "name" : "BbandsParams", "fields" : [ { "name" : "maType", "type" : "int", "default" : 0 }, { "name" : "nbDevUp", "type" : "int", "default" : 0 }, { "name" : "nbDevDn", "type" : "int", "default" : 0 } ] } }, { "name" : "result", "type" : { "type" : "record", "name" : "BbandsResult", "fields" : [ { "name" : "lower", "type" : "double", "default" : 0 }, { "name" : "middle", "type" : "double", "default" : 0 }, { "name" : "upper", "type" : "double", "default" : 0 } ] } } ] }
I would expect the generated class for BbandsOutput to include the subclass BbandsParams
// tslint:disable import { BaseAvroRecord } from "../../BaseAvroRecord"; import {BbandsParams} from "./BbandsParams"; import {BbandsResult} from "./BbandsResult"; export interface BbandsOutputInterface { params: BbandsParams; result: BbandsResult; } export class BbandsOutput extends BaseAvroRecord implements BbandsOutputInterface { public static readonly subject: string = "BbandsOutput"; public static readonly schema: object = { "type": "record", "name": "BbandsOutput", "namespace": "dapp.kasirka", "fields": [ { "name": "params", "type": { "type": "record", "name": "BbandsParams", "fields": [ { "name": "maType", "type": "int", "default": 0 }, { "name": "nbDevUp", "type": "int", "default": 0 }, { "name": "nbDevDn", "type": "int", "default": 0 } ] } }, { "name": "result", "type": { "type": "record", "name": "BbandsResult", "fields": [ { "name": "lower", "type": "double", "default": 0 }, { "name": "middle", "type": "double", "default": 0 }, { "name": "upper", "type": "double", "default": 0 } ] } } ] } public static deserialize(buffer: Buffer, newSchema?: object): BbandsOutput { const result = new BbandsOutput(); const rawResult = this.internalDeserialize(buffer, newSchema); result.loadValuesFromType(rawResult); return result; } public params: BbandsParams; public result: BbandsResult; public schema(): object { return BbandsOutput.schema; } public subject(): string { return BbandsOutput.subject; } }
But instead, the records are defined as interfaces inside the BbandsOutput file, like this:
// tslint:disable import { BaseAvroRecord } from "../../BaseAvroRecord"; export interface BbandsParams { maType: number; nbDevUp: number; nbDevDn: number; } export interface BbandsResult { lower: number; middle: number; upper: number; } export interface BbandsOutputInterface { params: BbandsParams; result: BbandsResult; } export class BbandsOutput extends BaseAvroRecord implements BbandsOutputInterface { public static readonly subject: string = "BbandsOutput"; public static readonly schema: object = { "type": "record", "name": "BbandsOutput", "namespace": "dapp.kasirka", "fields": [ { "name": "params", "type": { "type": "record", "name": "BbandsParams", "fields": [ { "name": "maType", "type": "int", "default": 0 }, { "name": "nbDevUp", "type": "int", "default": 0 }, { "name": "nbDevDn", "type": "int", "default": 0 } ] } }, { "name": "result", "type": { "type": "record", "name": "BbandsResult", "fields": [ { "name": "lower", "type": "double", "default": 0 }, { "name": "middle", "type": "double", "default": 0 }, { "name": "upper", "type": "double", "default": 0 } ] } } ] } public static deserialize(buffer: Buffer, newSchema?: object): BbandsOutput { const result = new BbandsOutput(); const rawResult = this.internalDeserialize(buffer, newSchema); result.loadValuesFromType(rawResult); return result; } public params: BbandsParams; public result: BbandsResult; public schema(): object { return BbandsOutput.schema; } public subject(): string { return BbandsOutput.subject; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a record for Bbands Params:
And and output object BbandsOutput, which has BbandsParams as one of it's fields.
I would expect the generated class for BbandsOutput to include the subclass BbandsParams
But instead, the records are defined as interfaces inside the BbandsOutput file, like this:
The text was updated successfully, but these errors were encountered: