func newField(f *gen.Field) (*spec.Field, error) {
	t, err := oasType(f)
	if err != nil {
		return nil, err
	}
	e, err := exampleValue(f)
	if err != nil {
		return nil, err
	}
	return &spec.Field{
		Unique:   true,
		Required: !f.Optional,
		Type:     *t,
		Example:  e,
	}, nil
}
// newField constructs a spec.Field out of a gen.Field.
newField constructs a spec.Field out of a gen.Field.
// newField constructs a spec . Field out of a gen . Field .
func newField(f *gen.Field) (*spec.Field, error) {
	t, err := oasType(f)
	if err != nil {
		return nil, err
	}
	e, err := exampleValue(f)
	if err != nil {
		return nil, err
	}
	return &spec.Field{
		Unique:   true,
		Required: !f.Optional,
		Type:     *t,
		Example:  e,
	}, nil
}
func newField ( f * gen . Field ) ( * spec . Field , error ) { t , err := oasType ( f ) if err != nil { return nil , err } e , err := exampleValue ( f ) if err != nil { return nil , err } return & spec . Field { Unique : true , Required : ! f . Optional , Type : * t , Example : e , } , nil }
newField constructs a spec.Field out of a gen.Field.
newField constructs a spec . Field out of a gen . Field .