openapi-typescript-codegen
Laravel
openapi-typescript-codegen | Laravel | |
---|---|---|
9 | 352 | |
2,673 | 76,808 | |
- | 0.3% | |
9.6 | 8.9 | |
1 day ago | 13 days ago | |
TypeScript | PHP | |
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.
openapi-typescript-codegen
-
Django 5.0 Is Released
I’d also add that if you use Typescript with an OpenAPI client generator (https://github.com/ferdikoomen/openapi-typescript-codegen) it can immensely alleviate some of the biggest pain points of seperate backend and front-end. It always used to be a major pain in the ass with the amount of overhead an API change would incur - updating documentation, postman, constant communication between backend and front-end devs, etc. Now I just npm run generate, I see new API changes in my Git client and Typescript errors for code that needs updating.
Also, using a library like Tanstack Query or Rdtk Query can almost completely eliminate manual state management, and kinda makes the whole development experience feel almost like SSR.
-
Ask HN: What would you use to build a mostly CRUD back end today?
I have been in love with Loopback.io since v2 even though it was a bit of a rollercoaster.. Loopback v4 is a beautiful library. Its been around longer than nestjs but that's the easiest thing to compare it too. I recently have been creating lb4 servers that interface nextjs and react native clients. Initially, I identify my entities and use cases that I want to build. I then use the lb4 cli to auto generate models, relations, controllers, datasources, interceptors (add logic on methods/classes). I can start testing them with the OpenAPI explorer. With the openapi-typescript-codegen library I can generate services from my lb4 OpenAPI spec that I can use on the client side. From there, you can really query data easily with the loopback filter (which can be used on the client too). I initially started doing this with angular1/2+ but its been pleasant using many clients. Even though I have been leveraging it for years in production, I am still learning and exploring. There are many other awesome things I can expand on or explain if you are interested!
https://loopback.io/doc/en/lb4/
https://github.com/ferdikoomen/openapi-typescript-codegen/tr...
-
tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy
In our current project with a TS frontend and Python backend, we use an OpenAPI schema as the source of truth and openapi-typescript-codegen [0] to interface with it on the client side. While not perfect, it provides a very nice interface to our API with request/response typings.
I also wrote a 10-line mock API wrapper that you can call as mockApi((request) => response), and it will type-check that your mock function implements the API correctly.
[0]: https://github.com/ferdikoomen/openapi-typescript-codegen
-
Is it possible to create a dynamic type/interface from API response
Second step is to generate typescript types from the backend's spec. You can use a library like this.
- Voi va generați modele automat pe FE?
-
A minimalist backend REST API in NodeJS
openapi-typescript-codegen Generates a Typescript client with interfaces from an OpenAPI spec.
-
Merging duplicate interfaces
I'm not familiar with all the options openapi-generator has. I tried it awhile ago and found it quite buggy, and more of a pain to run, especially if you're not already doing Java development. I ended up preferring OpenAPI Typescript Codegen, which is written in Typescript. One option it has which would solve the problem you're running into here, is that you can tell it to use union types instead of enums. So your interfaces would be generated as
-
Don't make me think, or why I switched to Rails from JavaScript SPAs
I'm currently working on two separate projects, the first is a Django project with DRF and I codegen with drf-spectacular [1] and openapi-typescript-codegen [2]. The other project also uses Django, with the API through Hasura and codegen with graphql-codegen [3]. In both of these cases I've been able to largely avoid duplicating my models clientside, or at least it isn't manual.
1: https://github.com/ferdikoomen/openapi-typescript-codegen
2: https://drf-spectacular.readthedocs.io/en/latest/
3: https://github.com/dotansimha/graphql-code-generator
-
Need some advice on how do do my webapp (front + backend)
For typescript client code generation, I typically use something like openapi-typescript-codegen, but there are a lot more generators (like the openapi-generator project) that are imperfect in their own ways, I'm sure you can find one that works for you.
Laravel
- Como configurar imagem Docker(PHP e Nginx) para projetos Laravel com PHP 8.3
-
Developing a Reusable and Readable Bash Script for Automated LAMP Stack Deployment
cd /var/www/ || handle_error "Failed to change directory to /var/www/." sudo git clone https://github.com/laravel/laravel.git laravel || handle_error "Failed to clone Laravel repository."
-
RESTful APIs with Laravel: Best Practices
Laravel is a popular PHP framework known for its expressive syntax and rich ecosystem of features. Here's why it shines for building RESTful APIs:
-
Mastering Application Security: The Power of Rate Limiting
Implementation In this article, we'll delve into the concept of rate limiting in Laravel; a popular PHP framework. We will explore how to set it up, customize it to suit your application's needs, and handle common scenarios. By the end, you'll have the knowledge and confidence to implement rate limiting in your Laravel applications, enhancing their security and stability.
-
From Beginner to Master: The Path to Becoming a PHP Guru
Delving into PHP frameworks like Laravel or Symfony is like building a skyscraper, with Composer acting as your "construction foreman," guiding you step by step to ensure your code is robust and awe-inspiring. This stage involves getting familiar with popular PHP frameworks such as Laravel, Symfony, CodeIgniter, etc., and utilizing the functionalities provided by these frameworks to rapidly develop efficient, maintainable web applications. Tools to consider: Laravel, Composer.
-
Laravel Roadmap
Your very first starting point should be the Laravel documentation. Known for its clear explanations and user-friendly layout, the Laravel documentation makes setup a breeze, ensuring you get off to the best possible start.
-
Creating GraphQL APIs with Laravel
In this tutorial, we will learn how to create a GraphQL API with Laravel, a popular PHP web framework. We will be creating a simple student model, seeding the database with dummy data, setting up a database connection, and creating a GraphQL server by defining our API's schema, queries, and mutations. We’ll also learn how to make requests to our API (test our endpoints) using a tool like Insomnia or Postman. By the end of this tutorial, you will have a working GraphQL API that you can continue to expand and improve.
-
Top 12 PHP Frameworks For Web Development in 2024
Laravel is an open-source PHP framework on GitHub with 75.7k stars and 24.2k forks used for building web applications. It was first released in 2011 and follows the Model-View-Controller (MVC) architecture. It comes with an expressive and elegant syntax. It is fine-tuned for building professional web applications and ready to handle enterprise workloads. It achieves this by integrating the best packages from the PHP ecosystem and creating a framework that is also developer-friendly. Other than its foundational features, It also provides tools for dependency injection, unit testing, real-time events, and many more.
-
Introduction 🚀
For this project, we will use Laravel, one of the biggest, most popular and most complete frameworks for PHP, along with Livewire, which will help us make our notifications real-time and reactive. Let's create a project from scratch and implement authentication and notification features for users tagged in posts.
- Automatizando fluxos de trabalho com GitHub Actions
What are some alternatives?
openapi-client-axios - JavaScript client library for consuming OpenAPI-enabled APIs with axios
Spiral Framework - High-Performance PHP Framework
orval - orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
Gin - Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
SvelteKit - web development, streamlined
Slim Framework - Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
Devise Token Auth - Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Slim - Slim Framework 4 Skeleton Application
graphql-code-generator - A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
Flask - The Python micro framework for building web applications.
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
tesseract-ocr-for-php - A wrapper to work with Tesseract OCR inside PHP.