Forum Discussion

anshika's avatar
anshika
Occasional Visitor
4 months ago

parsing models

I'm currently trying to use // swagger:model on top of my model structs for documentation and i'm facing an issue where swagger is unable to parse it down to the primitive type. Here's the exact issue:

// swagger:model

TCBMsg struct {

Ext cos.StrKVs `json:"ext"`

Transform

CopyBckMsg 

NumWorkers int `json:"num-workers,omitempty"`

ContinueOnError bool `json:"coer,omitempty"`

}

Ext cos.StrKVs is:

type (

StrSet map[string]struct{}

StrKVs map[string]string

)

Transform and CopyBckMsg are embedded structs. Swagger is only able to parse TCBMsg if I remove Ext cos.StrKVs `json:"ext"`. 

 

I was wondering if there is any way around this issue? 

swag version: v1.16.

No RepliesBe the first to reply