square / square/connect-api-specification

Question about generate-sdk

Open
#141 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
76
Forks
36
Avg merge
3h 14m
Merged PRs (30d)
1

Description

I've been using this as a tutorial of sorts while I mess with swagger-codegen for the first time. When I run the generate-sdk shell script for php, I don't appear to get a generated ApiClient.php file that is then shown in the connect-php-sdk example:

require 'vendor/autoload.php';

$access_token = 'YOUR_ACCESS_TOKEN';
# setup authorization
$api_config = new \SquareConnect\Configuration();
$api_config->setHost("https://connect.squareup.com");
$api_config->setAccessToken($access_token);
$api_client = new \SquareConnect\ApiClient($api_config);
# create an instance of the Location API
$locations_api = new \SquareConnect\Api\LocationsApi($api_client);

Is that file supposed to be generated by swagger-codegen? If so, what might I be doing wrong?

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

Start by running the PHP generate-sdk shell script and comparing its output with the connect-php-sdk example. Inspect whether ApiClient.php is expected in the generated files; done means determining the source of the mismatch and updating the example or instructions so the generated SDK and usage agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, php, shell
Domain
documentation, tooling
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.