swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Httpsig

Open twinforces opened this issue 7 years ago • 9 comments

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

See Issue #8090 for more details, or you can read the RFC this is implementing.

twinforces avatar Apr 27 '18 21:04 twinforces

Thanks @twinforces for the PR!

Can you run samples scripts?

  • ./bin/python-petstore.sh
  • ./bin/security/python-petstore.sh
  • ./bin/bin/python-httpsig-petstore.sh

@taxpon @frol @mbohlool @cbornet

kenjones-cisco avatar Apr 27 '18 22:04 kenjones-cisco

On the comment about the RFC being a draft, I feel like most RFCs live for years as a draft.

twinforces avatar Apr 30 '18 17:04 twinforces

@frol thanks for suggestions, they should all be implemented now.

@kenjones-cisco Would you like me to email the results from running the sample scripts? I get differences in all the samples for all languages, its not clear which should be checked in as checking in the generated code seems like an anti pattern. Or I can add a giant commit with all the updates.

twinforces avatar May 03 '18 00:05 twinforces

It is just updating the generate code for the specific language only, ie python. Depending on the change it can be large.

kenjones-cisco avatar May 03 '18 00:05 kenjones-cisco

Yes I’m just updating python but git reports changes in all languages. I can commit just the python diffs or all or none. Please advise.

twinforces avatar May 03 '18 02:05 twinforces

You only need updates of the samples specific to python.

./bin/python-petstore.sh
./bin/security/python-petstore.sh
./bin/bin/python-httpsig-petstore.sh

kenjones-cisco avatar May 10 '18 19:05 kenjones-cisco

Ok, see commit. Hint if you're not used to reviewing large commits in GitHub: Set to "View All" diffs, then jump to samples/client/petstore/python/ to see just the changes to the regular python client which should be minimal. The httpsig client is in a different folder, best way to examine those changes it probably to check out the branch, and do a local compare between samples/client/petstore/python and samples/client/petstore-security-test/python-httpsig

twinforces avatar May 10 '18 20:05 twinforces

Also, my DE pointed out that AWS has a similar signing mechanism: https://docs.aws.amazon.com/general/latest/gr//signing_aws_api_requests.html so its possible someone other than myself could use this work as a basis of using Swagger to generate AWS APIs...

twinforces avatar May 10 '18 20:05 twinforces

@ackintosh The change you made to EnumTest seems to be causing a unit test failure in Python, I was wondering if you could advise me?

twinforces avatar May 10 '18 22:05 twinforces