curlconverter
NSwag
Our great sponsors
curlconverter | NSwag | |
---|---|---|
6 | 39 | |
7,115 | 6,468 | |
1.5% | - | |
7.7 | 8.9 | |
15 days ago | 6 days ago | |
TypeScript | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
curlconverter
-
Convert Curl Commands to Code
Simple way would be to add a “curl” options, looks like you’d just need to write up a method that matches this Request interface [0] to some curl command substrings you mash together.
Problem is of course: the headers and options are all going to be included. You could make it so it organizes them better though, maybe indenting and grouping like-options together so it’s easier to remove stuff.
[0] https://github.com/curlconverter/curlconverter/blob/e4b6fb74...
-
Show HN: OpenAPI DevTools – Chrome ext. that generates an API spec as you browse
I made a fork of the Chrome DevTools that adds exactly this. You can tell Chrome to use a different version of the DevTools if you start it from the command line
https://github.com/curlconverter/curlconverter/issues/64#iss...
- Program that converts a curl call into python code?
-
Ask HN: What companies are embracing “HTML over the wire”?
Someone added a ColdFusion Markup Language generator to https://curlconverter.com/cfml/ last year and after a few months I decided to remove it since I've never heard of it so nobody could possibly be using it, and the next day the guy who added support for it and 3 other people complained about it, so it seems like they're out there.
https://github.com/curlconverter/curlconverter.github.io/pul...
-
I absolutely love web scraping.
Relevant tools: - Browser dev tools and front-end tooling to debug JS and reconstruct requests in your code - grep.app and SourceGraph to check open-source parsers for some URLs (often, there are such repositories) - curlconverter to quickly draft a script from the cURL command - Regex and regex playgrounds to extract data from inline JavaScript - GraphQL introspection tools - Optionally, Fiddler or Wireshark to intercept and debug network requests (I don't use but my teammate does)
-
Convert curl commands to code in several languages
Original author here. Many smart people have contributed code over the years, but one warrants special mention.
About a year ago, verhovsky showed up out of nowhere. He rewrote the core of the application and increased the professionalism across the board. (dedicated domain, github page hosting, UI refresh, privacy improvements, and much more)
The tree-sitter PR is a monster achievement: https://github.com/curlconverter/curlconverter/pull/278
Search for parseAnsiCString in there. I don't think that had ever been implemented in JavaScript before.
For you, verhovsky, 10x engineer might be an understatement. Thank you!
NSwag
-
This week I released v2.1 of my text-templating library Weave that now uses Source Generators by default.
I'm mostly using it for C# API client generation from backend code - sort of similar to what a tool like NSwag Studio will do. I think NTypewriter has more flexibility though, and having a live view with the VS plugin makes development quick.
-
OpenAPI v4 Proposal
NSwag does a wonderful job of generating TypeScript clients from OpenAPI specs. Definitely give it a shot before killing your current setup.
https://github.com/RicoSuter/NSwag (It sucks in any OpenAPI yml, not just ones from Swashbuckle/C#)
- Looking for an alternative to NSwag
-
The Typescript ecosystem is exhausting
I use this https://github.com/RicoSuter/NSwag but it's designed for .Net backends to some extent. But you can use the client generation from the command line or manually with the standalone client app.
- Code generation from Swagger specification file
-
Tool for generating example API requests and responses from OpenAPI
Here are three tools that you can use to generate example API requests and responses from OpenAPI specifications. These tools should work well even if your schemas are deeply nested: Nswag (Command Line and GUI): Nswag is a Swagger/OpenAPI toolchain for .NET, TypeScript, and other platforms. It supports code generation, client generation, and API documentation. You can use NswagStudio, which is a graphical interface, or you can use the command line tool called "NSwag.exe" for generating example API requests and responses. GitHub: https://github.com/RicoSuter/NJsonSchema NswagStudio: https://github.com/RicoSuter/NSwag/wiki/NSwagStudio Dredd (Command Line): Dredd is a language-agnostic command-line tool for validating API descriptions against backend implementations. It supports OpenAPI, Swagger, and API Blueprint formats. Dredd can generate example requests and responses and validate whether your API implementation conforms to the API description. GitHub: https://github.com/apiaryio/dredd Documentation: https://dredd.org/en/latest/ Stoplight Studio (GUI): Stoplight Studio is a modern API design and documentation platform that supports OpenAPI and JSON Schema. It allows you to create, edit, and validate OpenAPI specifications and provides a powerful visual interface for generating example API requests and responses. Website: https://stoplight.io/studio/ GitHub: https://github.com/stoplightio/studio These tools should provide you with the ability to generate example API requests and responses from your OpenAPI specifications and handle deeply nested schemas.
- Help me to generate swagger json Net 6
-
Web API generate of swagger json file
I’ve got an ASP.NET Core web API - I integrate NSwag (which I prefer to Swashbuckle - personal preference), run the app locally to generate the actual JSON file. See https://github.com/RicoSuter/NSwag Then I have a Bicep file that creates the API from the OpenAPI specification. Sorry - I don’t do Terraform (most of the Azure samples are of Bicep, but it should be easy to convert).
-
Open API Generators for Typescript / Node?
I have actually found that, but I was hoping for something with more popularity. E.g. this one is for .NET: https://github.com/RicoSuter/NSwag ( you can also generate typescript clients). But I do not want to bring in the dependency to another language, if possible.
-
Best practices of create models for back-end commutation.
If your API exposes a Swagger definition, you can use NSwag (https://github.com/RicoSuter/NSwag) to generate the TypeScript API Client and Models for you. We found this eliminates errors due to TS and API DTO’s not matching
What are some alternatives?
curl-to-php - Convert curl commands to PHP code in your browser
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
curl-to-go - Convert curl commands to Go code in your browser
autorest - OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python
playwright_stealth - playwright stealth
Refit - The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
insomnia - The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
swagger-ui - Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
rosso - Data parsers and formatters
Polly - Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.
blog
protobuf-net.Grpc - GRPC bindings for protobuf-net and grpc-dotnet