8000 Codegen fixture [discriminators] produces code that doesn't compile · Issue #1376 · go-swagger/go-swagger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Codegen fixture [discriminators] produces code that doesn't compile #1376
Closed
@fredbi

Description

@fredbi

Problem statement

Broken codegen on fixture

Swagger specification

./fixtures/codegen/todolist.discriminators.yml

Steps to reproduce

swagger generate server --spec=./fixtures/codegen/todolist.discriminators.yml --name=nrcodegen --target=./gen-todolist.discriminators
cd ./gen-todolist.discriminators/cmd/nrcodegen-server
go build

Produces:

# github.com/go-swagger/go-swagger/fixtures/bugs/909/gen-todolist.discriminators/models
../../models/kennel.go:45:52: cannot call non-function m.Pets (type KennelPets)
../../models/kennel.go:49:18: cannot call non-function m.Pets (type KennelPets)

Environment

swagger version: [current master]
go version: 1.9.1
OS: linux ubuntu 14.02

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdiscriminatorRelated to polymorphic typesgeneratormodelRelated to swagger generate model command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0