-
Notifications
You must be signed in to change notification settings - Fork 351
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
C# Dot Net Core Codegen #57
Open
Clamibot
wants to merge
35
commits into
postmanlabs:develop
Choose a base branch
from
Clamibot:C#_Core_Codegen
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This update adds in the folder for the C# .Net Core code snipped generator. Contents from csharp-restsharp were copied into this folder and will be modified to generate C# code snippets utilizing .Net Core.
I ported a few RestSharp functions to .Net Core compatible code. The .Net Core code snippet generator now includes the functions for: - Adding request headers - Adding timeouts - Sending the request
I renamed restcharp.js to dotnetcore.js and fixed a little whoops I found.
I reformatted some of the code so eslintrc no longer screams at me for formatting it doesn't like.
also fixed part of parseBody
I fixed some formatting issues with strings.
…t/postman-code-generators-1 into C#_Core_Codegen_Addition
I made some changes to the test cases so they would test for .Net Core compatible code instead of RestSharp API compatible code. I also made some formatting changes so the code looks nicer. In addition, I did more work porting over RestSharp code to .Net Core compatible code.
I ported RestSharp redirects to .Net Core Compatible code.
…t/postman-code-generators-1 into C#_Core_Codegen_Addition
I formatted the generated code so it looks nice, and I finally found the code block where the other 23 tests are executed. All tests are now enabled.
I changed the compiler used when running tests becasue the VS compiler supports the syntax from newer versions of C#. I also added the required dependency for compilation and got rid of the one for RestSharp. In addition, file data is now inserted into the request body if a file is being sent with the request.
I fixed a few whoopsies in the code and added all required dependencies for main.cs to compile. There is a runtime error that needs to be fixed though.
Isaac and I implemented PATCH requests, and also added HEAD and OPTIONS requests to the list of requests like GET. In addition, I updated the sample test response to reflect the changes we made in the code snippet generator.
Also messed with var compile and var run, but they still throw errors
I redid the run and compile path variables since mono now works on our testbed machines.
…t/postman-code-generators-1 into C#_Core_Codegen_Addition
I changed the dependencies to the libraries Mono provides so it can compile the source C# file generated by the code snippet generator.
I cleaned up the code and updated the boilerplate template.
Formatting for everything is currently unfinished
I did some formatting work on the request bodies so stuff wouldn't break when the code snippet generator generates a snippet.
Updated formatting for form data.
File uploads now partially work. We still need to implement a mechanism that inserts form data into the request.
File uploads now fully work. We're still working on uploading form data.
I optimized generated code snippets so the snippet itself would take less operations to compete its task. In addition, I cleaned up the code that generates the code snippets. In addition, I removed the tabs from the generated code since only the program skeleton will not be generated by the code snippet generator, just the body.
I implemented form data uploads.
I implemented uploading additional form data along with a file. In addition, I modified the sample test response json to match the current format of the snippet.
I modified the sample test to accomodate for the new changes in the format of the generated code. In addition, I disabled most of the tests after they all passed.
C# Core Codegen Addition
ghost
reviewed
Jul 25, 2019
My partner and I cleaned up all commented out code, we reverted changes to .eslintrc, we changed all the windows style linebreaks to unix style linebreaks, and we reformatted our code to make it compliant with the original rules defined in .eslintrc.
We reverted tha author name in package.json back to Postman Labs and added our names to dotnetcore.js instead.
allenheltondev
approved these changes
Aug 14, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Glad to have native .NET core code!
Any updates on this? |
@Clamibot there is a conflict, could you take a look at it? |
Status on this? |
@Clamibot ping? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My partner and I created a C# code snippet generator to generate .Net Core Web API code for web requests. We used the C# RestSharp code snippet generator as our basis.