<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ibrahim</title>
    <description>The latest articles on DEV Community by Ibrahim (@ibrahimislam).</description>
    <link>https://dev.to/ibrahimislam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F9016%2F5cadc35d-78eb-43e5-b7b9-ccdcc6f244f5.jpeg</url>
      <title>DEV Community: Ibrahim</title>
      <link>https://dev.to/ibrahimislam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ibrahimislam"/>
    <language>en</language>
    <item>
      <title>Bit by Ear: Daily Two-Minute Audio Lessons from Your Own Notes</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Sun, 25 Oct 2026 20:34:41 +0000</pubDate>
      <link>https://dev.to/ibrahimislam/bit-by-ear-daily-two-minute-audio-lessons-from-your-own-notes-2cea</link>
      <guid>https://dev.to/ibrahimislam/bit-by-ear-daily-two-minute-audio-lessons-from-your-own-notes-2cea</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Bit by Ear&lt;/strong&gt; turns the notes and PDFs you've been meaning to read into short daily audio episodes. Add a topic, your context, and your sources; adjust and approve the proposed learning plan once. From then on, a background worker prepares each next episode on schedule, and you just press play — two minutes or less, with each episode briefly recalling the previous idea before introducing a new one. It's a private, installable PWA with saved playback position and optional ready-episode notifications. The lazy part: you do the thinking once, then only listen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://streamable.com/e/63ng4k" rel="noopener noreferrer"&gt;▶ Watch the demo on Streamable&lt;/a&gt;&lt;br&gt;
&lt;a href="https://bit-by-ear.onrender.com/" rel="noopener noreferrer"&gt;▶ Live&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mii9000" rel="noopener noreferrer"&gt;
        mii9000
      &lt;/a&gt; / &lt;a href="https://github.com/mii9000/bit-by-ear" rel="noopener noreferrer"&gt;
        bit-by-ear
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Bit by Ear&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Small listens. Steady learning.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Explore something you’ve been meaning to learn, one idea at a time. Bit by Ear turns your own notes and documents into connected daily audio stories. Add a topic and context, adjust and approve your learning plan, then listen at your own pace in a private, installable web app. Each episode briefly recalls the previous idea and introduces a new one. Published audio is measured to be two minutes or less; episode-ready notifications are optional.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Run locally&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Requirements: Node.js 22.22 or newer in the 22.x line, npm, and Docker Desktop (or Docker Engine with Compose).&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm ci
cp .env.example .env
npm run local:setup
npm run dev&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Open &lt;a href="http://localhost:5173" rel="nofollow noopener noreferrer"&gt;http://localhost:5173&lt;/a&gt;. Local development uses deterministic mock providers, so the complete learning flow works without provider credentials. Add OpenRouter and ElevenLabs keys to &lt;code&gt;.env&lt;/code&gt; and set &lt;code&gt;PROVIDER_MODE=real&lt;/code&gt; when you want to try live generation. Keys stay…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/mii9000/bit-by-ear" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; React + TypeScript PWA (installable, offline shell, saved playback position, optional Web Push).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Express/TypeScript API plus a Node worker, sharing PostgreSQL. The server enforces resource limits and rejects episodes whose measured audio exceeds two minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-source AI:&lt;/strong&gt; &lt;a href="https://openrouter.ai/z-ai/glm-5.3-flash" rel="noopener noreferrer"&gt;GLM 5.3 Flash&lt;/a&gt; — an open-weight model via OpenRouter — drafts the learning plan and every episode script from the learner's own sources; ElevenLabs narrates each approved script.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ops:&lt;/strong&gt; a Render Blueprint (&lt;code&gt;render.yaml&lt;/code&gt;) with web service, background worker, and PostgreSQL. Local development uses deterministic mock providers, so the complete flow runs with no API keys and no cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;The part of the app that actually writes the curriculum is an open-weight model, and it sits behind a single environment variable — &lt;code&gt;OPENROUTER_MODEL&lt;/code&gt;. Swapping GLM for any other open-weight model is a config change, not a rewrite, so the project never depends on one vendor's roadmap or pricing for its core intelligence. Because generation is cheap and open, a hobby-scale "daily audio for one learner" app is economically viable, and anyone can fork it and run the whole flow locally on mock providers without signing up for anything. A closed, single-provider API would have made both the price of daily generation and the longevity of the project somebody else's decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;Setup is the only real work: upload sources, tweak the plan, approve. After that the daily cost is pressing play on a two-minute episode — no re-reading, no highlighting, no deciding what to study next. The worker keeps preparing episodes even when the free web service sleeps, and there are no streaks or guilt mechanics; missing a day just means an episode is waiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render&lt;/strong&gt; — the whole system (web service, background worker, PostgreSQL) deploys from the repo's Render Blueprint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs&lt;/strong&gt; — every episode is narrated with ElevenLabs multilingual v2 voices.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Auto Generate Client From OpenAPI Specification (Swagger)</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Tue, 06 Apr 2021 16:17:33 +0000</pubDate>
      <link>https://dev.to/ibrahimislam/auto-generate-client-from-openapi-specification-swagger-6h9</link>
      <guid>https://dev.to/ibrahimislam/auto-generate-client-from-openapi-specification-swagger-6h9</guid>
      <description>&lt;p&gt;&lt;em&gt;TL;DR - Working script at the end&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In a microservices system, one of the mechanism for one service to talk to another is using Http. For example, if &lt;strong&gt;Service A&lt;/strong&gt; wants to invoke an endpoint on &lt;strong&gt;Service B&lt;/strong&gt; it can do something like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;HttpClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BaseAddress&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://service-b"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;responseMessage&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;PostAsJsonAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/some-endpoint"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Payload&lt;/span&gt;&lt;span class="p"&gt;(...));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The issue here is that the model class &lt;code&gt;Payload&lt;/code&gt; was already written in &lt;code&gt;B&lt;/code&gt; but then &lt;code&gt;A&lt;/code&gt; would have to write it again in order to have typing and whenever there would be a change in specification in &lt;code&gt;B&lt;/code&gt; then &lt;code&gt;A&lt;/code&gt; would have to be manually changed also. So coupled and duplication.&lt;/p&gt;

&lt;p&gt;Now, lets assume another &lt;code&gt;Service C&lt;/code&gt; wants to invoke the same endpoint on &lt;code&gt;B&lt;/code&gt; so, &lt;code&gt;C&lt;/code&gt; would have to duplicate the code like &lt;code&gt;A&lt;/code&gt; again.&lt;/p&gt;

&lt;p&gt;We can can get rid of this manual and redundant process by auto-generating clients from the services like API SDKs which can then be consumed by another service.&lt;/p&gt;

&lt;h4&gt;
  
  
  To Dos:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Integrate with Swagger for your web api&lt;/li&gt;
&lt;li&gt;Access to auto-generated &lt;code&gt;swagger.json&lt;/code&gt; based on your web api&lt;/li&gt;
&lt;li&gt;Tool to auto-generate code according to choice of language&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  1. Integrate with Swagger for your web api
&lt;/h4&gt;

&lt;p&gt;Pretty easy in ASP.NET Core. Use &lt;a href="https://github.com/domaindrivendev/Swashbuckle.AspNetCore"&gt;Swashbuckle&lt;/a&gt; to integrate swagger into your web api. Getting started tutorial &lt;a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Access to auto-generated &lt;code&gt;swagger.json&lt;/code&gt; based on your web api
&lt;/h4&gt;

&lt;p&gt;When you run your web api app, you can access the &lt;code&gt;swagger.json&lt;/code&gt; at &lt;code&gt;http://localhost:&amp;lt;port&amp;gt;/swagger/v1/swagger.json&lt;/code&gt;. Now either you can pass the link to &lt;code&gt;swagger.json&lt;/code&gt; or make it accessible from file system. If you go the former route then you need to ensure your web api is up somewhere and updated or spin it up locally. I went ahead with downloading the file into file system using &lt;a href="https://github.com/domaindrivendev/Swashbuckle.AspNetCore#swashbuckleaspnetcorecli"&gt;Swashbuckle.AspNetCore.Cli&lt;/a&gt; which can generate &lt;code&gt;swagger.json&lt;/code&gt; from your web api assembly. &lt;/p&gt;

&lt;h4&gt;
  
  
  3. Tool to auto-generate code according to choice of language
&lt;/h4&gt;

&lt;p&gt;I only found &lt;code&gt;NSwag&lt;/code&gt; or &lt;a href="(https://github.com/swagger-api/swagger-codegen)"&gt;&lt;code&gt;swagger-codegen&lt;/code&gt;&lt;/a&gt; for this and went ahead with the latter because it has more options and configurability. A great feature of this tool is that you can control the generated code through the use of mustache templates documented &lt;a href="https://github.com/swagger-api/swagger-codegen/wiki/Mustache-Template-Variables"&gt;here&lt;/a&gt;. If you want to kickstart your template customization for your preferred language then look &lt;a href="https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources"&gt;here&lt;/a&gt;. Now, you can execute a command as simple as &lt;code&gt;swagger-codegen generate -i ./swagger.json -l ruby -o /tmp/test/&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example script
&lt;/h2&gt;

&lt;p&gt;Below is an example of bash script that is generating a customized C# client in a Linux machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;swaggerCodeGenCliDownloadLink&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.25/swagger-codegen-cli-3.0.25.jar'&lt;/span&gt;
&lt;span class="nv"&gt;swaggerCodeGenCliPath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'./swagger-codegen-cli.jar'&lt;/span&gt;
&lt;span class="nv"&gt;finalGeneratedClientPath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'./DEV.Client/generated'&lt;/span&gt;
&lt;span class="nv"&gt;swaggerGenOut&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'./swagger-code-gen-out'&lt;/span&gt;
&lt;span class="nv"&gt;swaggerInputFilePath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'./swagger.json'&lt;/span&gt; 
&lt;span class="nv"&gt;swaggerTemplateFolderPath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'./swagger-code-gen-templates'&lt;/span&gt;
&lt;span class="nv"&gt;ApiProjectName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'DEV.API'&lt;/span&gt;
&lt;span class="nv"&gt;clientProjectName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'DEV.Client'&lt;/span&gt;

&lt;span class="c"&gt;# Color&lt;/span&gt;
&lt;span class="nv"&gt;RED&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[0;31m'&lt;/span&gt;
&lt;span class="nv"&gt;GREEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[0;32m'&lt;/span&gt;
&lt;span class="nv"&gt;YELLOW&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[0;33m'&lt;/span&gt;
&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[0m'&lt;/span&gt; &lt;span class="c"&gt;# No Color&lt;/span&gt;

&lt;span class="k"&gt;function &lt;/span&gt;red &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;RED&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;function &lt;/span&gt;green &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GREEN&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;function &lt;/span&gt;yellow &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;YELLOW&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# build api project&lt;/span&gt;
dotnet build &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$ApiProjectName&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$ApiProjectName&lt;/span&gt;&lt;span class="s2"&gt;.csproj"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;green &lt;span class="s1"&gt;'Building project done!'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;#restore swashbuckle aspnetcore cli tool&lt;/span&gt;
dotnet tool restore
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;green &lt;span class="s1"&gt;'Restored dotnet tools!'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# generate swagger json&lt;/span&gt;
dotnet swagger tofile &lt;span class="nt"&gt;--output&lt;/span&gt; swagger.json &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$ApiProjectName&lt;/span&gt;&lt;span class="s2"&gt;/bin/Debug/net5.0/&lt;/span&gt;&lt;span class="nv"&gt;$ApiProjectName&lt;/span&gt;&lt;span class="s2"&gt;.dll"&lt;/span&gt; v1
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;green &lt;span class="s1"&gt;'Generating swagger.json done!'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# download swagger code gen cli&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;$swaggerCodeGenCliPath&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;yellow &lt;span class="s1"&gt;'Downloading swagger-code-gen cli...'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
    curl &lt;span class="nv"&gt;$swaggerCodeGenCliDownloadLink&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$swaggerCodeGenCliPath&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# generate models and apis&lt;/span&gt;
java &lt;span class="nt"&gt;-Dapis&lt;/span&gt; &lt;span class="nt"&gt;-DapiDocs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="nt"&gt;-Dmodels&lt;/span&gt; &lt;span class="nt"&gt;-DmodelDocs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="nt"&gt;-DapiTests&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="nt"&gt;-DmodelTests&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="nt"&gt;-jar&lt;/span&gt; &lt;span class="nv"&gt;$swaggerCodeGenCliPath&lt;/span&gt; generate &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="nv"&gt;$swaggerInputFilePath&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; csharp &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$swaggerGenOut&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="nv"&gt;$swaggerTemplateFolderPath&lt;/span&gt; &lt;span class="nt"&gt;--additional-properties&lt;/span&gt; &lt;span class="nv"&gt;modelPackage&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$clientProjectName&lt;/span&gt; &lt;span class="nv"&gt;apiPackage&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$clientProjectName&lt;/span&gt; &lt;span class="nv"&gt;packageName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$clientProjectName&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;green &lt;span class="s1"&gt;'Generating models and apis done!'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# if there was previously generated then delete it&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;$finalGeneratedClientPath&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;red &lt;span class="s1"&gt;'Deleting stale generated folder'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
    &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nv"&gt;$finalGeneratedClientPath&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# move the generate code into target client project&lt;/span&gt;
&lt;span class="nb"&gt;mv&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$swaggerGenOut&lt;/span&gt;&lt;span class="s2"&gt;/src/&lt;/span&gt;&lt;span class="nv"&gt;$clientProjectName&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$clientProjectName&lt;/span&gt;&lt;span class="s2"&gt;/"&lt;/span&gt; &lt;span class="nv"&gt;$finalGeneratedClientPath&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;green &lt;span class="s1"&gt;'Moving files to client project done!'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# remove temp swagger code generated folder&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nv"&gt;$swaggerGenOut&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;green &lt;span class="s1"&gt;'Removed temp generated directory'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>aspnetcore</category>
      <category>swagger</category>
      <category>codegen</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
