OpenAPITools / OpenAPITools/openapi-generator

[REQ] GenericOpenAPIError can't be created for tests

Open
#19,718 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

All fields in GenericOpenAPIError are not exported.
In this way a GenericOpenAPIError can't be created for tests.

Describe the solution you'd like

Export fields

Describe alternatives you've considered

Provide a function that is able to create GenericOpenAPIError for tests

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for the GenericOpenAPIError definition and inspect how generated clients and tests currently construct errors. Confirm which fields are unexported and check related tests or generated Go client entry points. Done means tests can create a GenericOpenAPIError directly, or a documented constructor provides equivalent access.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.