Swagger Codegen Typescript Axios

API-First with Swagger ottobre 6, 2017 sghinux Lascia un commento Go to comments With the growing birth of new channels and interconnected devices (web, mobile, iOT. NET Core + TypeScript # Setup # Install ASP. This provides a UI to easily understand service contract and consumer can interact with service without any detailed knowledge of underlying logic. swagger-codegenを使って、デフォルトで以下みたいに吐き出すと、タイトルを使用した適当な名前になってしまう $ swagger-codegen generate -i swagger. This is an online swagger codegen server. Learn about what API First means and how to define and implement an API using Swagger. jar in one folder and executed the following statement that will create a api. Current Tags. With the swagger contract, communication with another language system easily, like javascript or etc; Big cloud platforms like AWS, Google, kubernetes can deploy API gateway pattern with swagger. md This document describes how to extend Swagger data models to allow the types of fields to vary. Please type java -jar swagger-codegen-cli. swagger-typescript-fetch-api - Swagger codegen for TypeScript Fetch API. Source Code can be. $ swagger-codegen generate -i swagger. Skill Level: Intermediate This article introduces a generator that scaffolds a fully functional 12-factor compliant Node. Inside maven pom. Swagger Editor: Swagger Editor lets you edit OpenAPI specifications in YAML inside your browser and to preview documentations in real time. 0-format version of your API. swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. NET Web API “ and is focused on Angular 2+ code examples and respective SDLC. Download Swagger Codegen. Queue Management for Wechat MiniProgram Latest. Netflix , AngularClass , and PiggyPot are some of the popular companies that use Falcor, whereas Swagger Codegen is used by NDS , WAITR , and edu. Swagger Codegen Swagger Codegen is a scaffolding engine that gives us the option to generate interactive documentation, API clients, and server stubs from Swagger definitions. Once you’ve landed on this page, select a version of Swagger, I’ve been using so far 2. It may however. Angular 2 API client generator from swagger json. 5-SNAPSHOT (19 September 2018) com. Opinionated axios client code generator for SPA. Chocolatey is trusted by businesses to manage software deployments. WSO2 APIM 3. Swagger Codegen is now OpenAPI Generator. Download Swagger Codegen. Swagger Codegen. This overrides the default ApiClient implementation for code-generated Java SDK clients, adding support for cookie-based auth and improved error-handling logic specific t. Once you've landed on this page, select a version of Swagger, I've been using so far 2. This tutorial includes samples of cloning a Swagger Codegen project and how to generate a client. The tool greatly relieves the burden of documenting and interacting with APIs. js microservice based on TypeScript by first generating an OpenAPI Specification file and then focusing only on developing the business logic. Generating Frontend Code from the Swagger Specification File. Code generator for strongly typed client API in TypeScript for jQuery, Angular 2+ and Aurelia, as well as TypeScript/JavaScript applications that use Axios. "Phoenix", provides ways to manage your account without having to log into our control panel. Swagger-codegen is a tool to generate a server API stub code and a client library. It may however. CodeGeneration. These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various languages. This package contains the middleware to generate and serve the Swagger specification, Swagger UI (v2 and v3), and ReDoc UI. you can’t typically have hyphens in a method name for client SDKs). 44K GitHub stars and 454 GitHub forks. Until axios reaches a 1. Swagger codegen supports a. The Swagger/OpenAPI toolchain for. As of Aug 2016, Swagger Codegen supports the following server stub generation: * PHP Lumen * PHP Slim * PHP Silex * Ruby on Rails 5 * Ruby Sinatra * Python Flask * C#. In this tutorial, we'll go over how to build a simple CRUD application with Swagger Documentation using NestJS and Swagger. Swagger Codegen with 10. swagger-typescript-fetch-api - Swagger codegen for TypeScript Fetch API. Swagger UI Visualize OpenAPI Specification definitions in an interactive UI. NSwag is another open source project for generating Swagger documents and integrating Swagger UI or ReDoc into ASP. ts └── models. You can find out more at https://github. I´m trying to use my own model codegen outside of the Swagger Codegen project (it works fine if I place the classes and templates inside the codegen project). Swagger is an open source software to build standard documentation in a human readable format for REST APIs. {"swagger":"2. Swagger Codegen is an open source project which allows generation of API client libraries (SDK generation), server stubs, and documentation automatically from an OpenAPI Specification. Server had CORS (Cross-Origin Resource Sharing) enabled. Swagger is a simple yet powerful representation of your RESTful API. 0","info":{"description":"This is an online swagger codegen server. ts └── model ├── Book. -e "SWAGGER_FILE=swagger. In order to read the file, we have to set a value to represent the root path, called WEBROOT_PATH (or whatever) in the AppSettings section. The Swagger/OpenAPI toolchain for. This typed format makes larger APIs more manageable and easy to use. Serve the Swagger UI to browse and test the web API. Chocolatey is trusted by businesses to manage software deployments. {"swagger":"2. NET Core web APIs. On the other hand, Swagger Codegen is detailed as "*Generate API clients or server stubs for REST API *". Typescript로 Vue. ts └── model ├── Book. 3 Swagger to JS & Vue & Axios Codegen. Angular 2 API client generator from swagger json. We need to set TSS_LOG environment variable to log to a file (see below) and then open VSCode through command line for it to pick up the TSS_LOG exported variable and then we can tail the file. 0 and they have an isomorphic typescript-fetch generator. Read tutorials, posts, and insights from top Swagger experts and developers for free. Since we have nearly 100% typescript type coverage, making sweeping changes is a breeze. Swaggerいいことまとめ Swaggerが統合されたフレームワークであれば、実装コードにSwagger用のメタデー タを付与するだけで、ドキュメントの構築が可能 使い方は、それぞれのフレームワークのドキュメントを見よう かなりの言語が対応しているはず 実装と. Bayer has 3 jobs listed on their profile. I need the following things for my React project: - Routing - Typescript. data or reject axios. TypeScript --version 13. This typed format makes larger APIs more manageable and easy to use. First, install ASP. Generate the Swagger specification for the implemented web API. GitHub Gist: star and fork jaredpalmer's gists by creating an account on GitHub. NET Core + TypeScript # Setup # Install ASP. I have published the. Hence, Swagger comes into picture. js microservice based on TypeScript by first generating an OpenAPI Specification file and then focusing only on developing the business logic. json endpoint that will return the API specification. Swagger Viewer lets you preview and validate Swagger 2. next transpilation and more. gitignore or. A comprehensive API management solution for your entire API lifecycle from creation to management. io to generate cl. While this research focuses on Swagger, I think the findings can be applied when thinking about other API definition formats like API Blueprint or RAML, but kicking things off with a focus on Swagger is wise. 前回に引き続きSwagger Codegenを使ってみました。Swaggerの他のツールについてざっと把握したい方は、Swaggerの概要をまとめてみたをご覧ください。 この記事で扱うのは表の一番下、Swagger Codegen です。 Swagger Specで記載された. Until axios reaches a 1. data or reject axios. Try it out: swagger-typescript-generate lists no main file and has no index. A Swagger Codegen for typescript, nodejs & angularjs. Description. swagger-codegen自动生成代码工具的介绍与使用的更多相关文章. API Client. Responsible for the process of planning and implementation of outsourcing systems for printing, systems development with agile Scrum methodology, Java, team coordination, internal training instruction, resource management, logistics, billing control for department billing purposes, administration of Microsoft networks, virtualization environments with VMWare, NDDigital products. benjaminsproule. We wanted a code generator that is 1) easy to write, maintain and extend and that 2) produces readable code. Please note that this has been changed so that it can be applied for the purposes of this book. swagger-node-codegen : JavaScript: Apache-2. jar config-help -l typescript-angular You will have to adjust the following. TypeScript --version 13. 0 specification file. The code is refactored for readability, converted to TypeScript and has good test coverage. io which can be used to generate API client library from swagger. Enums You can use the enum keyword to specify possible values of a request parameter or a model property. I used the nswag to generate the code in typescript from my EF core API, the enum based class doesn't convert as expected when using [DisplayName] or [Description] DataAnnotation. API Client. ) the use of restful APIs has become fundamental and the API First Design can be a winning strategy. Unfortuntately, it does not support typescript (which is my language of choice at this point) for server stub code. Swagger Codegen OpenAPIに則って記述されたスキーマからAPIクライアントとスタブサーバーを自動生成するツールです。 自動生成により開発コストを削減するだけでなく、スタブサーバーがあることでフロントエンドの開発もバックエンドの開発を待たずに進める. For example, when you start at a college or university you may have a long-term goal to graduate and a short-term goal to find a job for supplemental income. NSwag is a Swagger/OpenAPI 2. You received this message because you are subscribed to the Google Groups "Swagger" group. 44K GitHub stars and 454 GitHub forks. We hope you will find OpenAPI Generator useful in your projects. Swagger is an open source software to build standard documentation in a human readable format for REST APIs. NSwag is a Swagger/OpenAPI 2. swagger codegen swagger ui. 2 - Updated Feb 21, 2018 - 86 stars miniprogram-queue. They are not generated by Swagger Codegen. In development mode, navigate to the API tools section. NET Core web APIs. Once you have selected a version, download the jar for the version you want to use. 0) specification; written in Python 3. This package contains the middleware to generate and serve the Swagger specification, Swagger UI (v2 and v3), and ReDoc UI. Swashbuckle. NET Core and TypeScript #. swagger-codegen - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition HTML 📔 The eBook A Beginner's Guide to Code Generation for REST APIs is a good starting point for beginners. Today we will learn how to easily generate Angular code from a Java Spring Boot project using Springfox Swagger and Swagger Codegen. io to generate cl. Additionally, Swagger UI (which is an actively managed project with an Apache 2. js 시작하기 - 6. swagger-type-variance. WebApi dotnet add package NSwag. 3 For projects that support PackageReference , copy this XML node into the project file to reference the package. Looking for an easy way to connect a TypeScript-based Angular application to the backend? Swagger (the Open API Initiative) makes it easy and we will show you how! Learn the specific steps. We've also based our implementation on existing code generators (such as Swagger) which have proven themselves to be successful over time. Learn about what API First means and how to define and implement an API using Swagger. #swagger #openapi #api 2. js, so it can't be directly required. benjaminsproule. This provides a UI to easily understand service contract and consumer can interact with service without any detailed knowledge of underlying logic. NET Core Web API help pages using Swagger. As of Aug 2016, Swagger Codegen supports the following server stub generation: * PHP Lumen * PHP Slim * PHP Silex * Ruby on Rails 5 * Ruby Sinatra * Python Flask * C#. They are not generated by Swagger Codegen. Here are a few tips to get nice and clean results using the two together in ASP. We are looking for a new maintainer. Graphql Typed Client. 9K: Version History. Swagger is an open source software to build standard documentation in a human readable format for REST APIs. 3 Swagger to JS & Vue & Axios Codegen. The generated file structure would be as follows: Here, the. ts │ └── api. Using Swagger to Connect a Backend to an Angular Frontend Learn how you can use Swagger to ease the creation of an Angular front-end based on an existing set of RESTful services- everyone wants to. 0) extension to generate C# or TypeScript HttpClient code (as well as C# Controllers) for OpenAPI (formerly Swagger API) web service with NSwag code generator. 44K GitHub stars and 454 GitHub forks. Now I can use the Swagger UI to explore generated REST API. Once you have selected a version, download the jar for the version you want to use. yml" \ - the name of the swagger file (within the /spec volume above) sandcastle/swagger-codegen-docker - the name of the docker image to run Available Languages. We’ll then decide which SDK generation tools to use and make all of the SDKs available via. To use the NSwag ASP. Net y Carlos Bastos - … Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. swagger-codegen - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition HTML 📔 The eBook A Beginner's Guide to Code Generation for REST APIs is a good starting point for beginners. Swagger API Demo Swagger API youtube Swagger API java Swagger API Java Swagger API integration Swagger API Design Using the Editor on a local machine You can run and use the Swagger Editor on your. Swagger to JS & Vue & Axios Codegen. IntroductionLet’s say you have an advanced backend system, for which you wish to develop a modern Angular frontend, or, perhaps it’s not your backend, but something public like Facebook, and you want to develop a site using some of its exposed APIs. IBM - API Connect vs Swagger Codegen: What are the differences? Developers describe IBM - API Connect as "A comprehensive API management solution for your entire API lifecycle from creation to management". Installation Launch VS Code Quick Open ( Ctrl+P ), paste the following command, and press enter. Then, once the client has been generated, two additional topics show you how to make API calls (Java call to AMS360 API and C# to Rating API). json自动生成axios api访问代码 0. js, required setting ISwaggerOptions. Since we have nearly 100% typescript type coverage, making sweeping changes is a breeze. 其中swagger edit是用来编辑接口文档的小程序,非常简单易用. Swagger to Typescript Codegen. BTW typescript-generator can also generate JSDoc comments from Javadoc comments and recently also from Swagger annotations. Swagger Codegen allows you to generate a client in a wide variety of languages. Change Case. the es6 version is generated by calling typescript. Swashbuckle. Chocolatey is trusted by businesses to manage software deployments. This project is no longer actively maintained by its creator. If this is a mistake, please let us know. json -l javascript -o. I have published the. The code is generated using mustache templates and is quality checked by jshint and beautified by js-beautify. I´m trying to use my own model codegen outside of the Swagger Codegen project (it works fine if I place the classes and templates inside the codegen project). 44K GitHub stars and 454 GitHub forks. The most important thing is that it was GET request ran in Chrome. NET Core, TypeScript (jQuery, AngularJS, Angular 2+, Aurelia, KnockoutJS and more) and other platforms, written in C#. Chocolatey is trusted by businesses to manage software deployments. I can override this by appending "format=json" to the url. It runs a full Node. The code is generated using mustache templates and is quality checked by jshint and beautified by js-beautify. TypeScript CodeDOM, a CodeDOM component for TypeScript, derived from CodeDOM of. First, install ASP. However, the interface it generates changes that property to _long which is not correct. We want to accommodate as many languages and technologies as possible, so the first then we are going to do is convert our API Blueprint to Swagger (using apib2swagger) and publish our swagger. $ swagger-codegen generate -i swagger. For TypeScript generators, we've recently added the TypeScript Axios client generator [3] and there's an ongoing project to consolidate the TypeScript generators into one [4]. To get a list of languages supported by the Swagger Codegen - If you have Homebrew installed: swagger-codegen. swagger-codegen自动生成代码工具的介绍与使用的更多相关文章. swagger-type-variance. Additionally, Swagger UI (which is an actively managed project with an Apache 2. TypeScript. For use with Swagger-Codegen. We've also based our implementation on existing code generators (such as Swagger) which have proven themselves to be successful over time. Swagger Codegen Swagger Codegen is a project that allows you to generate API client libraries, server stubs, and documentation automatically if you have an OpenAPI Specification. HTML redoc. Swagger-to generates server and client code from Swagger (OpenAPI 2. Swagger Tools • Offers both Open Source and Commercial Tools • Swagger Editor - design your OpenAPI spec files • Swagger UI - documentation site generator • Swagger CodeGen - generate server stubs and client SDKs • Swagger Inspector - inspection and validation tool • Swagger Node - The module we’ll be using for the demo swagger. gitignore or. Generating Frontend Code from the Swagger Specification File. The farthest I've gotten is converting the Swagger 1. Swagger Editor. dotnet add package NSwag. -e "SWAGGER_FILE=swagger. You can configure Swagger inside your Application. This provides a UI to easily understand service contract and consumer can interact with service without any detailed knowledge of underlying logic. Stub TypeScript definitions entry for axios, which provides its own types definitions. TypeScript CodeDOM, a CodeDOM component for TypeScript, derived from CodeDOM of. For example, when you start at a college or university you may have a long-term goal to graduate and a short-term goal to find a job for supplemental income. Netflix , AngularClass , and PiggyPot are some of the popular companies that use Falcor, whereas Swagger Codegen is used by NDS , WAITR , and edu. swagger-codegen-ignore file, similar to. TypeScript --version 13. Installation Launch VS Code Quick Open ( Ctrl+P ), paste the following command, and press enter. Maybe that would work for you? Maybe that would work for you? This comment has been minimized. They are not generated by Swagger Codegen. These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various languages. Read tutorials, posts, and insights from top Swagger experts and developers for free. You can find out more at https://github. Self-hosted/SaaS Assertible - Import an OpenAPI specification into Assertible to generate tests that validate JSONSchema responses and status codes on every endpoint. The typescript generator is based on superagent and can be used for both nodejs and the browser via browserify/webpack. Typescript Microservices is an end-to-end guide that shows you the implementation of microservices from scratch; right from starting the project to hardening and securing your services. 0 and they have an isomorphic typescript-fetch generator. org SPRING 2016 VOL. But it doesn't provides any code generation ability from swagger spec. I need the following things for my React project: - Routing - Typescript. Since we will be working on ASP. Microsoft R Server's operationalization feature enables data scientists to deploy and consume web services to operationalize their R analytics. net, #swagger. Try it out: swagger-typescript-generate lists no main file and has no index. Swagger Viewer lets you preview and validate Swagger 2. the es6 version is generated by calling typescript. In following typescript-generator run this allows to generate another module which could depend on currently generated module. The output will be based on the language you specify, and includes default templates to include. Swagger Documentation WebApi AspNet TypeScript CodeGen. io which can be used to generate API client library from swagger. Swagger Codegen allows you to generate a client in a wide variety of languages. William and other top contributors (40+) of Swagger Codegen have decided to fork the project to maintain a community-driven version called "OpenAPI Generator", which supports both OpenAPI spec v2 an. java -jar. Then, once the client has been generated, two additional topics show you how to make API calls (Java call to AMS360 API and C# to Rating API). Auto Generate C# Client Proxy from Swagger Metadata from ASP. json自动生成axios api访问代码 0. com/swagger-api/swagger-codegen or on [irc. NET Framework. org SPRING 2016 VOL. make axios great again Latest release 3. I think swagger-codegen works with Swagger 3. Chocolatey integrates w/SCCM, Puppet, Chef, etc. They are not generated by Swagger Codegen. API First design can be used in web, mobile, and IoT applications. Now I can use the Swagger UI to explore generated REST API. In following typescript-generator run this allows to generate another module which could depend on currently generated module. I am assuming you are using Maven. API-First with Swagger ottobre 6, 2017 sghinux Lascia un commento Go to comments With the growing birth of new channels and interconnected devices (web, mobile, iOT. you can’t typically have hyphens in a method name for client SDKs). Swagger codegen supports a. Swagger Codegen allows you to generate a client in a wide variety of languages. Typescript Microservices is an end-to-end guide that shows you the implementation of microservices from scratch; right from starting the project to hardening and securing your services. Additionally, NSwag offers approaches to generate C# and TypeScript client code for your API. For definitions of common terms, see Key terms at the end of this article. Now I wanted to use Axios instead, so I used the OpenAPITools typescript-axios code generator. Generate Code Instantly Generate code out of your GraphQL schema with a single function call regardless of your environment or code format. jar generate -i swagger. Business logic is only on server, we send "canUpdate", "canDelete" etc. "Phoenix", provides ways to manage your account without having to log into our control panel. net, #swagger. Swagger to JS & Vue & Axios Codegen. it will always resolve axios. Swagger CodeGen: Cuando front encontró a back - Carlos Bastos y Luis Ruiz Pavón Autentia. You received this message because you are subscribed to the Google Groups "Swagger" group. # Q: What codegen tool? - jk. Server had CORS (Cross-Origin Resource Sharing) enabled. Contribute to innopals/swagger-axios development by creating an account on GitHub. Just keep in mind that tooling (swagger-ui or codegen) may need to coerce that string to something appropriate (i. NET Web API project Published 2016-09-30 Updated 2016-10-01 This tutorial shows how to integrate NSwag (Swagger toolchain for. The Swagger specification defines a set of files required to describe such an API. We are using swagger codegen to generate a TypeScript client. Swagger is probably the most popular API specification framework, AutoRest is a great library to generate clients out of Swagger definitions for various programming languages. ts └── models. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] Now, we know that swagger-codegen is not available for c#, but there are alternates for it like swagger. json file in your preferred programming language. Queue Management for Wechat MiniProgram Latest. NSwag Tutorial: Integrate the NSwag toolchain into your ASP. 0 and they have an isomorphic typescript-fetch generator. Generated JSON file contains mapping from Java classes to TypeScript types which typescript-generator needs when the module is referenced from another module using moduleDependencies parameter. Typical app with API, entities and ORM would have to define the models in 3 different and equivalent places: swagger for API, json-schema/Joi for entities, some ORM-specific format (e. The code is generated using mustache templates. Also fully supports Swagger Codegen, OpenAPI Generator, and NSwag open source generators. Swagger Codegen is an open source project which allows generation of API client libraries (SDK generation), server stubs, and documentation automatically from an OpenAPI Specification. AspNetCore NuGet package. This package contains the middleware to generate and serve the Swagger specification, Swagger UI (v2 and v3), and ReDoc UI. Hi, Iam trying to generate the SDK in dot net core using swagger (yaml file) ,using swagger codegen ,does it support the SDK generation in dot net. x) and integrates with other Swagger tooling. With the ignore file, you can specify individual files or directories can be ignored. Spring Swagger Code Generation. io which can be used to generate API client library from swagger. If you use OpenAPI 2 (fka Swagger), visit OpenAPI 2 pages. Additionally, Swagger UI (which is an actively managed project with an Apache 2. com/swagger-api/swagger-codegen or on [irc. We hope you will find OpenAPI Generator useful in your projects. The sections are not intended to represent exclusive focus during these terms. I am talking to a Swagger API (Java backend) using the code-generated code from swagger-codegen. It may however. OpenAPI Specification と Swagger Godegen に至るまで辿った道。CORBA, RMI, SOAP, Thrift, gRPC, REST, WADL, OpenAPI Specification などの話 スマートフォン用の表示で見る よしなしごと. Looking for an easy way to connect a TypeScript-based Angular application to the backend? Swagger (the Open API Initiative) makes it easy and we will show you how! Learn the specific steps. Overview Browse. 0 and OpenAPI files as you type in Visual Studio Code. In working on this though I found that MS is also working on their own version of codegen, called AutoRest. Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages. I am asking our legal team whether I can share it here. Chocolatey integrates w/SCCM, Puppet, Chef, etc. Swagger Codegen Swagger Codegen is a scaffolding engine that gives us the option to generate interactive documentation, API clients, and server stubs from Swagger definitions. The fact-checkers, whose work is more and more important for those who prefer facts over lies, police the line between fact and falsehood on a day-to-day basis, and do a great job. Today, my small contribution is to pass along a very good overview that reflects on one of Trump’s favorite overarching falsehoods. Namely: Trump describes an America in which everything was going down the tubes under  Obama, which is why we needed Trump to make America great again. And he claims that this project has come to fruition, with America setting records for prosperity under his leadership and guidance. “Obama bad; Trump good” is pretty much his analysis in all areas and measurement of U.S. activity, especially economically. Even if this were true, it would reflect poorly on Trump’s character, but it has the added problem of being false, a big lie made up of many small ones. Personally, I don’t assume that all economic measurements directly reflect the leadership of whoever occupies the Oval Office, nor am I smart enough to figure out what causes what in the economy. But the idea that presidents get the credit or the blame for the economy during their tenure is a political fact of life. Trump, in his adorable, immodest mendacity, not only claims credit for everything good that happens in the economy, but tells people, literally and specifically, that they have to vote for him even if they hate him, because without his guidance, their 401(k) accounts “will go down the tubes.” That would be offensive even if it were true, but it is utterly false. The stock market has been on a 10-year run of steady gains that began in 2009, the year Barack Obama was inaugurated. But why would anyone care about that? It’s only an unarguable, stubborn fact. Still, speaking of facts, there are so many measurements and indicators of how the economy is doing, that those not committed to an honest investigation can find evidence for whatever they want to believe. Trump and his most committed followers want to believe that everything was terrible under Barack Obama and great under Trump. That’s baloney. Anyone who believes that believes something false. And a series of charts and graphs published Monday in the Washington Post and explained by Economics Correspondent Heather Long provides the data that tells the tale. The details are complicated. Click through to the link above and you’ll learn much. But the overview is pretty simply this: The U.S. economy had a major meltdown in the last year of the George W. Bush presidency. Again, I’m not smart enough to know how much of this was Bush’s “fault.” But he had been in office for six years when the trouble started. So, if it’s ever reasonable to hold a president accountable for the performance of the economy, the timeline is bad for Bush. GDP growth went negative. Job growth fell sharply and then went negative. Median household income shrank. The Dow Jones Industrial Average dropped by more than 5,000 points! U.S. manufacturing output plunged, as did average home values, as did average hourly wages, as did measures of consumer confidence and most other indicators of economic health. (Backup for that is contained in the Post piece I linked to above.) Barack Obama inherited that mess of falling numbers, which continued during his first year in office, 2009, as he put in place policies designed to turn it around. By 2010, Obama’s second year, pretty much all of the negative numbers had turned positive. By the time Obama was up for reelection in 2012, all of them were headed in the right direction, which is certainly among the reasons voters gave him a second term by a solid (not landslide) margin. Basically, all of those good numbers continued throughout the second Obama term. The U.S. GDP, probably the single best measure of how the economy is doing, grew by 2.9 percent in 2015, which was Obama’s seventh year in office and was the best GDP growth number since before the crash of the late Bush years. GDP growth slowed to 1.6 percent in 2016, which may have been among the indicators that supported Trump’s campaign-year argument that everything was going to hell and only he could fix it. During the first year of Trump, GDP growth grew to 2.4 percent, which is decent but not great and anyway, a reasonable person would acknowledge that — to the degree that economic performance is to the credit or blame of the president — the performance in the first year of a new president is a mixture of the old and new policies. In Trump’s second year, 2018, the GDP grew 2.9 percent, equaling Obama’s best year, and so far in 2019, the growth rate has fallen to 2.1 percent, a mediocre number and a decline for which Trump presumably accepts no responsibility and blames either Nancy Pelosi, Ilhan Omar or, if he can swing it, Barack Obama. I suppose it’s natural for a president to want to take credit for everything good that happens on his (or someday her) watch, but not the blame for anything bad. Trump is more blatant about this than most. If we judge by his bad but remarkably steady approval ratings (today, according to the average maintained by 538.com, it’s 41.9 approval/ 53.7 disapproval) the pretty-good economy is not winning him new supporters, nor is his constant exaggeration of his accomplishments costing him many old ones). I already offered it above, but the full Washington Post workup of these numbers, and commentary/explanation by economics correspondent Heather Long, are here. On a related matter, if you care about what used to be called fiscal conservatism, which is the belief that federal debt and deficit matter, here’s a New York Times analysis, based on Congressional Budget Office data, suggesting that the annual budget deficit (that’s the amount the government borrows every year reflecting that amount by which federal spending exceeds revenues) which fell steadily during the Obama years, from a peak of $1.4 trillion at the beginning of the Obama administration, to $585 billion in 2016 (Obama’s last year in office), will be back up to $960 billion this fiscal year, and back over $1 trillion in 2020. (Here’s the New York Times piece detailing those numbers.) Trump is currently floating various tax cuts for the rich and the poor that will presumably worsen those projections, if passed. As the Times piece reported: