You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting from v1.12.0, generation fails, if the YAML includes required query params.
Example YAML:
openapi: "3.0.0"
info:
version: 1.0.0
title: Lorem Ipsum
paths:
/lorem-ipsum:
get:
summary: Lorem Ipsum
parameters:
- in: query
name: amount
required: true
schema:
type: number
responses:
200:
description: Success
Example calls:
./oapi-codegen -generate types -o api/api.types.gen.go -package api my.api.yaml
./oapi-codegen -generate gin,spec -o api/api.gen.go -package api my.api.yaml
Error message: api\api.gen.go:150:7: siw.ErrorHandler(c, fmt.Errorf("Query argument amount is required, but not found: %s", err), http.StatusBadRequest) (no value) used as value
Environment:
$ go version
go version go1.18.6 windows/amd64
The text was updated successfully, but these errors were encountered:
Starting from v1.12.0, generation fails, if the YAML includes required query params.
Example YAML:
Example calls:
Error message:
api\api.gen.go:150:7: siw.ErrorHandler(c, fmt.Errorf("Query argument amount is required, but not found: %s", err), http.StatusBadRequest) (no value) used as value
Environment:
$ go version
go version go1.18.6 windows/amd64
The text was updated successfully, but these errors were encountered: