We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated tests in Go Client don't properly reference non-primitive types for parameters it seems.
Generated Go Code is currently:
func Test_tea_client_TEAProductAPIService(t *testing.T) { configuration := tea_client.NewConfiguration() apiClient := tea_client.NewAPIClient(configuration) t.Run("Test TEAProductAPIService GetTeaProductByIdentifier", func(t *testing.T) { t.Skip("skip test") // remove to run test var productIdentifierType TypeProductIdentifierType resp, httpRes, err := apiClient.TEAProductAPI.GetTeaProductByIdentifier(context.Background(), productIdentifierType).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) })
var productIdentifierType TypeProductIdentifierType should be var productIdentifierType tea_client.TypeProductIdentifierType
var productIdentifierType TypeProductIdentifierType
var productIdentifierType tea_client.TypeProductIdentifierType
docker run \ --rm \ -v "$(PWD):/local" \ openapitools/openapi-generator-cli:v7.12.0 \ batch --clean /local/spec/generators/go.yaml
See CycloneDX/transparency-exchange-api#118 for full context.
paths: /product/{product-identifier-type}/{product-identifier}: get: description: Returns a list of TEA products. Note that multiple products may match. operationId: getTeaProductByIdentifier parameters: - $ref: "#/components/parameters/product-identifier-type" - $ref: "#/components/parameters/product-identifier" - $ref: "#/components/parameters/page-offset" - $ref: "#/components/parameters/page-size" responses: 200: description: Product retrieved successfully $ref: "#/components/responses/paginated-tea-product" 400: $ref: "#/components/responses/400-invalid-request" 404: $ref: "#/components/responses/404-object-by-id-not-found" tags: - TEA Product ... components: parameters: product-identifier-type: name: product-identifier-type description: The identifier type (enum) in: path required: true schema: $ref: "#/components/schemas/type_product_identifier_type" ... schemas: type_product_identifier_type: type: string description: Identifier types enum: - tei - purl - cpe
I'll work on a PR to address this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Generated tests in Go Client don't properly reference non-primitive types for parameters it seems.
Generated Go Code is currently:
var productIdentifierType TypeProductIdentifierType
should bevar productIdentifierType tea_client.TypeProductIdentifierType
openapi-generator version
See CycloneDX/transparency-exchange-api#118 for full context.
OpenAPI declaration file content or url
Related issues/PRs
Suggest a fix
I'll work on a PR to address this.
The text was updated successfully, but these errors were encountered: