From 709195eee84896c400cb9cb582f79f6f8fe53d28 Mon Sep 17 00:00:00 2001 From: James Phillpotts Date: Tue, 19 Dec 2023 15:45:27 +0000 Subject: [PATCH 1/5] reproduce issue with missing types --- internal/test/issues/issue/config.yaml | 7 ++++ internal/test/issues/issue/doc.go | 3 ++ internal/test/issues/issue/issue.yaml | 52 ++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 internal/test/issues/issue/config.yaml create mode 100644 internal/test/issues/issue/doc.go create mode 100644 internal/test/issues/issue/issue.yaml diff --git a/internal/test/issues/issue/config.yaml b/internal/test/issues/issue/config.yaml new file mode 100644 index 0000000000..91c03d124f --- /dev/null +++ b/internal/test/issues/issue/config.yaml @@ -0,0 +1,7 @@ +package: issue +generate: + echo-server: true + client: true + models: true + embedded-spec: true +output: issue.gen.go diff --git a/internal/test/issues/issue/doc.go b/internal/test/issues/issue/doc.go new file mode 100644 index 0000000000..ca9b852609 --- /dev/null +++ b/internal/test/issues/issue/doc.go @@ -0,0 +1,3 @@ +package issue + +//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml issue.yaml diff --git a/internal/test/issues/issue/issue.yaml b/internal/test/issues/issue/issue.yaml new file mode 100644 index 0000000000..93cc609edf --- /dev/null +++ b/internal/test/issues/issue/issue.yaml @@ -0,0 +1,52 @@ +openapi: "3.0.1" +components: + schemas: + Test: + type: object + properties: + field1: + description: A array of enum values + items: + enum: + - option1 + - option2 + type: string + maxItems: 5 + minItems: 0 + type: array + field2: + description: A nested object with allocated name + properties: + field1: + type: boolean + field2: + type: string + required: + - field1 + - field2 + type: object + x-go-type-name: MyTestRequestNestedField + field3: + description: A nested object without allocated name + properties: + field1: + type: boolean + field2: + type: string + required: + - field1 + - field2 + type: object + x-go-type-name: MyTestRequest +paths: + /test: + get: + operationId: test + requestBody: + content: + application/test+json: + schema: + $ref: "#/components/schemas/Test" + responses: + 204: + description: good From f32efb9d4290e9a083817c2c78981db1d93f5323 Mon Sep 17 00:00:00 2001 From: James Phillpotts Date: Tue, 19 Dec 2023 16:02:18 +0000 Subject: [PATCH 2/5] add generated code and rename for issue number --- .../issues/{issue => issue-1397}/config.yaml | 4 +- .../test/issues/{issue => issue-1397}/doc.go | 4 +- .../test/issues/issue-1397/issue1397.gen.go | 425 ++++++++++++++++++ .../issue.yaml => issue-1397/spec.yaml} | 0 4 files changed, 429 insertions(+), 4 deletions(-) rename internal/test/issues/{issue => issue-1397}/config.yaml (65%) rename internal/test/issues/{issue => issue-1397}/doc.go (52%) create mode 100644 internal/test/issues/issue-1397/issue1397.gen.go rename internal/test/issues/{issue/issue.yaml => issue-1397/spec.yaml} (100%) diff --git a/internal/test/issues/issue/config.yaml b/internal/test/issues/issue-1397/config.yaml similarity index 65% rename from internal/test/issues/issue/config.yaml rename to internal/test/issues/issue-1397/config.yaml index 91c03d124f..75a0507bd8 100644 --- a/internal/test/issues/issue/config.yaml +++ b/internal/test/issues/issue-1397/config.yaml @@ -1,7 +1,7 @@ -package: issue +package: issue1397 generate: echo-server: true client: true models: true embedded-spec: true -output: issue.gen.go +output: issue1397.gen.go diff --git a/internal/test/issues/issue/doc.go b/internal/test/issues/issue-1397/doc.go similarity index 52% rename from internal/test/issues/issue/doc.go rename to internal/test/issues/issue-1397/doc.go index ca9b852609..4dd8581a3c 100644 --- a/internal/test/issues/issue/doc.go +++ b/internal/test/issues/issue-1397/doc.go @@ -1,3 +1,3 @@ -package issue +package issue1397 -//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml issue.yaml +//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml spec.yaml diff --git a/internal/test/issues/issue-1397/issue1397.gen.go b/internal/test/issues/issue-1397/issue1397.gen.go new file mode 100644 index 0000000000..9e6859270c --- /dev/null +++ b/internal/test/issues/issue-1397/issue1397.gen.go @@ -0,0 +1,425 @@ +// Package issue1397 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0-00010101000000-000000000000 DO NOT EDIT. +package issue1397 + +import ( + "bytes" + "compress/gzip" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strings" + + "github.com/getkin/kin-openapi/openapi3" + "github.com/labstack/echo/v4" +) + +// Test defines model for Test. +type Test = MyTestRequest + +// MyTestRequest defines model for . +type MyTestRequest struct { + // Field1 A array of enum values + Field1 *[]TestField1 `json:"field1,omitempty"` + + // Field2 A nested object with allocated name + Field2 *MyTestRequestNestedField `json:"field2,omitempty"` + + // Field3 A nested object without allocated name + Field3 *struct { + Field1 bool `json:"field1"` + Field2 string `json:"field2"` + } `json:"field3,omitempty"` +} + +// TestApplicationTestPlusJSONRequestBody defines body for Test for application/test+json ContentType. +type TestApplicationTestPlusJSONRequestBody = Test + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // TestWithBody request with any body + TestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + TestWithApplicationTestPlusJSONBody(ctx context.Context, body TestApplicationTestPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) TestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTestRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TestWithApplicationTestPlusJSONBody(ctx context.Context, body TestApplicationTestPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTestRequestWithApplicationTestPlusJSONBody(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewTestRequestWithApplicationTestPlusJSONBody calls the generic Test builder with application/test+json body +func NewTestRequestWithApplicationTestPlusJSONBody(server string, body TestApplicationTestPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewTestRequestWithBody(server, "application/test+json", bodyReader) +} + +// NewTestRequestWithBody generates requests for Test with any type of body +func NewTestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/test") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // TestWithBodyWithResponse request with any body + TestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestResponse, error) + + TestWithApplicationTestPlusJSONBodyWithResponse(ctx context.Context, body TestApplicationTestPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*TestResponse, error) +} + +type TestResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r TestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TestWithBodyWithResponse request with arbitrary body returning *TestResponse +func (c *ClientWithResponses) TestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestResponse, error) { + rsp, err := c.TestWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseTestResponse(rsp) +} + +func (c *ClientWithResponses) TestWithApplicationTestPlusJSONBodyWithResponse(ctx context.Context, body TestApplicationTestPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*TestResponse, error) { + rsp, err := c.TestWithApplicationTestPlusJSONBody(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseTestResponse(rsp) +} + +// ParseTestResponse parses an HTTP response from a TestWithResponse call +func ParseTestResponse(rsp *http.Response) (*TestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ServerInterface represents all server handlers. +type ServerInterface interface { + + // (GET /test) + Test(ctx echo.Context) error +} + +// ServerInterfaceWrapper converts echo contexts to parameters. +type ServerInterfaceWrapper struct { + Handler ServerInterface +} + +// Test converts echo context to params. +func (w *ServerInterfaceWrapper) Test(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.Test(ctx) + return err +} + +// This is a simple interface which specifies echo.Route addition functions which +// are present on both echo.Echo and echo.Group, since we want to allow using +// either of them for path registration +type EchoRouter interface { + CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route +} + +// RegisterHandlers adds each server route to the EchoRouter. +func RegisterHandlers(router EchoRouter, si ServerInterface) { + RegisterHandlersWithBaseURL(router, si, "") +} + +// Registers handlers, and prepends BaseURL to the paths, so that the paths +// can be served under a prefix. +func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) { + + wrapper := ServerInterfaceWrapper{ + Handler: si, + } + + router.GET(baseURL+"/test", wrapper.Test) + +} + +// Base64 encoded, gzipped, json marshaled Swagger object +var swaggerSpec = []string{ + + "H4sIAAAAAAAC/8xTO2/bMBD+K8K1W2XLj3bh1g4FPLRD4C3IQEsnmQbFo8lTYsHQfw+OUmzkBSRbJh2O", + "9/F76HiGklpPDh1HUGeI5R5bncotRpavD+QxsMHUrQ3aailVhbEMxrMhBwp+ZzoE3WdUZ+i6NrvXtsMI", + "ORjGNiGlDeoWKEGWkE/VCu5y4N4jKIgcjGtgyKHVp82I/HU5TQxymESs3hLhMDJWGe0OWHL2YHifaWup", + "1NJ1ukXI3zU0seyILGr3nOeFviGHgMfOBKzE0nTHBXA1NAqBHE6zhmbSnCUVCv71EvANHjuM/D/J/ivo", + "C+/6Y/6o4y9hUQCfMw2DYIyrCZTrrJWFQKe9AQXr+WIubF7zPnkoeFrHBtNH/GmJZVOBGnd1FIyR/1DV", + "y0xJjtGlce29NWUCpJt+HKIk+rTwUn0PWIOCb8X1RRTTcyi2k9wUSvTk4pjsavHz9V9qiKo0PAyPAQAA", + "///99gukXwMAAA==", +} + +// GetSwagger returns the content of the embedded swagger specification file +// or error if failed to decode +func decodeSpec() ([]byte, error) { + zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) + if err != nil { + return nil, fmt.Errorf("error base64 decoding spec: %w", err) + } + zr, err := gzip.NewReader(bytes.NewReader(zipped)) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + var buf bytes.Buffer + _, err = buf.ReadFrom(zr) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + + return buf.Bytes(), nil +} + +var rawSpec = decodeSpecCached() + +// a naive cached of a decoded swagger spec +func decodeSpecCached() func() ([]byte, error) { + data, err := decodeSpec() + return func() ([]byte, error) { + return data, err + } +} + +// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. +func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { + res := make(map[string]func() ([]byte, error)) + if len(pathToFile) > 0 { + res[pathToFile] = rawSpec + } + + return res +} + +// GetSwagger returns the Swagger specification corresponding to the generated code +// in this file. The external references of Swagger specification are resolved. +// The logic of resolving external references is tightly connected to "import-mapping" feature. +// Externally referenced files must be embedded in the corresponding golang packages. +// Urls can be supported but this task was out of the scope. +func GetSwagger() (swagger *openapi3.T, err error) { + resolvePath := PathToRawSpec("") + + loader := openapi3.NewLoader() + loader.IsExternalRefsAllowed = true + loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { + pathToFile := url.String() + pathToFile = path.Clean(pathToFile) + getSpec, ok := resolvePath[pathToFile] + if !ok { + err1 := fmt.Errorf("path not found: %s", pathToFile) + return nil, err1 + } + return getSpec() + } + var specData []byte + specData, err = rawSpec() + if err != nil { + return + } + swagger, err = loader.LoadFromData(specData) + if err != nil { + return + } + return +} diff --git a/internal/test/issues/issue/issue.yaml b/internal/test/issues/issue-1397/spec.yaml similarity index 100% rename from internal/test/issues/issue/issue.yaml rename to internal/test/issues/issue-1397/spec.yaml From d4358af62c95977137d0ad6b00187240fa3403e0 Mon Sep 17 00:00:00 2001 From: James Phillpotts Date: Tue, 19 Dec 2023 16:09:39 +0000 Subject: [PATCH 3/5] candidate fix --- internal/test/issues/issue-1397/issue1397.gen.go | 15 +++++++++++++++ pkg/codegen/codegen.go | 2 +- pkg/codegen/operations.go | 4 ++-- pkg/codegen/schema.go | 14 ++++---------- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/internal/test/issues/issue-1397/issue1397.gen.go b/internal/test/issues/issue-1397/issue1397.gen.go index 9e6859270c..36c9a79266 100644 --- a/internal/test/issues/issue-1397/issue1397.gen.go +++ b/internal/test/issues/issue-1397/issue1397.gen.go @@ -20,9 +20,24 @@ import ( "github.com/labstack/echo/v4" ) +// Defines values for TestField1. +const ( + Option1 TestField1 = "option1" + Option2 TestField1 = "option2" +) + // Test defines model for Test. type Test = MyTestRequest +// TestField1 defines model for Test.Field1. +type TestField1 string + +// MyTestRequestNestedField A nested object with allocated name +type MyTestRequestNestedField struct { + Field1 bool `json:"field1"` + Field2 string `json:"field2"` +} + // MyTestRequest defines model for . type MyTestRequest struct { // Field1 A array of enum values diff --git a/pkg/codegen/codegen.go b/pkg/codegen/codegen.go index f4942eae0a..dfdc45e0f7 100644 --- a/pkg/codegen/codegen.go +++ b/pkg/codegen/codegen.go @@ -514,7 +514,7 @@ func GenerateTypesForSchemas(t *template.Template, schemas map[string]*openapi3. Schema: goSchema, }) - types = append(types, goSchema.GetAdditionalTypeDefs()...) + types = append(types, goSchema.AdditionalTypes...) } return types, nil } diff --git a/pkg/codegen/operations.go b/pkg/codegen/operations.go index 950186f6f9..663f8a93e2 100644 --- a/pkg/codegen/operations.go +++ b/pkg/codegen/operations.go @@ -868,11 +868,11 @@ func GenerateTypeDefsForOperation(op OperationDefinition) []TypeDefinition { // Now, go through all the additional types we need to declare. for _, param := range op.AllParams() { - typeDefs = append(typeDefs, param.Schema.GetAdditionalTypeDefs()...) + typeDefs = append(typeDefs, param.Schema.AdditionalTypes...) } for _, body := range op.Bodies { - typeDefs = append(typeDefs, body.Schema.GetAdditionalTypeDefs()...) + typeDefs = append(typeDefs, body.Schema.AdditionalTypes...) } return typeDefs } diff --git a/pkg/codegen/schema.go b/pkg/codegen/schema.go index 7f48f71050..7508cbeb4e 100644 --- a/pkg/codegen/schema.go +++ b/pkg/codegen/schema.go @@ -66,15 +66,6 @@ func (s *Schema) AddProperty(p Property) error { return nil } -func (s Schema) GetAdditionalTypeDefs() []TypeDefinition { - var result []TypeDefinition - for _, p := range s.Properties { - result = append(result, p.Schema.GetAdditionalTypeDefs()...) - } - result = append(result, s.AdditionalTypes...) - return result -} - type Property struct { Description string JsonFieldName string @@ -405,6 +396,9 @@ func GenerateGoSchema(sref *openapi3.SchemaRef, path []string) (Schema, error) { Deprecated: p.Value.Deprecated, } outSchema.Properties = append(outSchema.Properties, prop) + if len(pSchema.AdditionalTypes) > 0 { + outSchema.AdditionalTypes = append(outSchema.AdditionalTypes, pSchema.AdditionalTypes...) + } } if schema.AnyOf != nil { @@ -438,7 +432,7 @@ func GenerateGoSchema(sref *openapi3.SchemaRef, path []string) (Schema, error) { Description: newTypeDef.Schema.Description, GoType: typeName, DefineViaAlias: true, - AdditionalTypes: []TypeDefinition{newTypeDef}, + AdditionalTypes: append(outSchema.AdditionalTypes, newTypeDef), } } From 6fd3d133c80da652316c89b72be9aa1e46ad8d5f Mon Sep 17 00:00:00 2001 From: James Phillpotts Date: Thu, 25 Jan 2024 14:01:24 +0000 Subject: [PATCH 4/5] reinstate function --- pkg/codegen/schema.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/codegen/schema.go b/pkg/codegen/schema.go index 7508cbeb4e..da1cad1482 100644 --- a/pkg/codegen/schema.go +++ b/pkg/codegen/schema.go @@ -66,6 +66,10 @@ func (s *Schema) AddProperty(p Property) error { return nil } +func (s Schema) GetAdditionalTypeDefs() []TypeDefinition { + return s.AdditionalTypes +} + type Property struct { Description string JsonFieldName string From 9813d529c9e806b81987d21b7de108f7f9f53d57 Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Sat, 18 May 2024 15:02:30 +0100 Subject: [PATCH 5/5] sq --- internal/test/issues/issue-1397/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/test/issues/issue-1397/config.yaml b/internal/test/issues/issue-1397/config.yaml index 75a0507bd8..d4a1284eeb 100644 --- a/internal/test/issues/issue-1397/config.yaml +++ b/internal/test/issues/issue-1397/config.yaml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=../../../../configuration-schema.json package: issue1397 generate: echo-server: true