OpenAPITools / OpenAPITools/openapi-generator

[REQ] Feature Request Description

Open
#14,202 0 comments 0 reactions 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.

Better API 'usage' documentation??

Describe the solution you'd like

Working in PHP I can find many examples of generating an API using the openapi-generator-cli, but after multiple searches over many days, I have yet to find any really good examples of actually 'using' the generated code.

Describe alternatives you've considered

I'm working with an api that requires some additional parameters be passed either in headers or parameters and I'm having a hard time getting them working consistently, either with other people's manually generated apis or with code I build myself. I generated an api with this code, but the spec for the api first generates errors that I have to tell the generator to ignore to even begin building code, then it generates not one, but multiple client interfaces for a single api.
I'm assuming that it expects I pass it an already oauth2 authenticated client before making any queries, but I'm not sure how to set up a config to handle the additional header and other parameters. Do I use the 'key' as the username? How do the 'keys' for the access tokens come into play? The docs on this api don't show using the 'secret' anywhere, but the generated code seems to have a place for it. I'm not sure how to even begin and can't find any examples to help other than in ruby! (while I can translate somewhat, it's still not one-to-one)

Additional context

I tried to see if I could generate something for angularjs but then ran into two variants in the generator and no documentation on what one I should use or how to plug it into an angularjs api. Same problem, different language!

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

No source file or test is named. Start by locating the existing Ruby usage examples and the generated PHP and AngularJS client documentation, then define examples for headers, parameters, OAuth2 configuration, and the AngularJS generator variants; done means a newcomer can follow those examples for authenticated API calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
angularjs, openapi, php
Domain
api, authentication, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.