Skip to content
New issue

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

Fixed ssv and tsv formats. Added csv. #7974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

borisbn
Copy link

@borisbn borisbn commented Apr 5, 2018

Fixed query array parameters for collection formats ssv and tsv. Added csv format

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

Fixed query array parameters for collection formats ssv and tsv. Added csv format
@wing328
Copy link
Contributor

wing328 commented Apr 5, 2018

cc the technical committee: @ravinikam @stkrwork @fvarose @etherealjoy @MartinDelille

@wing328 wing328 added this to the v2.4.0 milestone Apr 5, 2018
@MartinDelille
Copy link
Contributor

@borisbn Can you run bin/qt5-petstore.sh and push the example updated code so we can discuss the generated code?

@borisbn
Copy link
Author

borisbn commented Apr 10, 2018

@MartinDelille Sorry, but I'm very new to GitHub (it's my first commit at all), and I don't know how to push files to repository in my branch(( Maybe I should create a new commit?
I'll attach generated code to this comment.
Sorry once more.
samples.zip

@wing328
Copy link
Contributor

wing328 commented Apr 10, 2018

@borisbn yes, after updating the files, you will need to add a new commit (git commit -a) and push out the new commit to your batch "patch-1" (git push origin patch-1) so this PR will contain 2 commits (or more)

(if there are new files, you will need to include the new files with "git add -A")

@MartinDelille
Copy link
Contributor

@borisbn @wing328 Small edit:

You may not be able to push to origin since you don't have write access to https://github.com/swagger-api/swagger-codegen

Let me tell you how I manage to make pull request:

First I clone the original code:

git clone https://github.com/swagger-api/swagger-codegen

Then I switch branch:

git checkout -b fix-something

I perform my edit and commit it to this new branch.

I fork the github repo (clicking the fork button here: https://github.com/swagger-api/swagger-codegen).

I need to add a new remote to my local repository:

git remote add md https://github.com/martindelille/swagger-codegen

Note that md is the remote name (and my initial by the way). You can use whatever you need.

To check that your remote are well set-up, you can type:

$ git remote -v
md	https://github.com/martindelille/swagger-codegen (fetch)
md	https://github.com/martindelille/swagger-codegen (push)
origin	https://github.com/swagger-api/swagger-codegen/ (fetch)
origin	https://github.com/swagger-api/swagger-codegen/ (push)

Now I push my commit to my Github repository:

git push -u md fix-something

Note that -u allow to tight this local branch with the remote branch. Next time I'll want to push a commit I could only do git push.

Now if you go back to https://github.com/swagger-api/swagger-codegen, I can see a button proposing to create a pull request.

In your case, you already have fork the repository (since we can see it here: https://github.com/borisbn/swagger-codegen) so you just need to do the following:

Add the remote to your local repository:

git remote add borisbn https://github.com/borisbn/swagger-codegen

Pull your branch:

git pull borisbn --all

Checkout your branch:

git checkout patch-1

Do your edit:

bin/qt5-petstore.sh

Commit it:

git commit -a

Push it:

git push

After that your change should appear in this PR.

I hope I'm clear! Don't hesitate to ask if necessary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants