Aug 09

Swagger Codegen can be used to create client and server stubs in various languages for testing APIs as they are being developed. Swagger Codegen is a Java application and, evidently, requires Java 8 to run.

Once generated, server stubs can be run to provide the means of testing the API under development through the Swagger Codegen UI interface, which replicates the Swagger Editor API testing pane.

The article referred to in this post walks the reader through the process of creating a Swagger Codegen environment in Windows 10’s Windows Subsystem for Linux 2 Alpine Linux distribution. The environment includes the “automatic” stub generation script for NodeJS API stub server code and a stub server executor that re-generates and re-starts the stub server whenever the API under development is changed on disk. See https://github.com/mwczapski/Swagger_Codegen_3_Docker_Container/blob/master/create_swagger_codegen_in_wsl_alpine.md for the article.

Jul 19

It is possible to develop locally-hosted openapi Specifications using the on-line [Swagger Editor](https://editor.swagger.io/). The on-line Swagger Editor allows a specification to be uploaded from the browser’s host, edited and saved to the browser’s host.

It is also possible, and quite easy, to stand up a locally-hosted Swagger Editor, and eliminate the need to be on-line for this work.

The document referred to in this post describes the resources needed to create a locally-hosted Swagger Editor as a Docker Container, and describes the workflow, with illustrations.

See https://github.com/mwczapski/api_development_with_private_swagger_editor  for package artefacts.

Jul 19

Among other activities, I design and implement RESTful APIs. I use the VSCode, the Swagger Editor, the Swagger UI and the Swagger Codegen, or a combination, as needed. I also use Docker for containerisation as much as possible because I dislike burdening my host machine with all manner of software and the resulting need to manage versions, version conflicts, etc..

The document referred to in this post addresses the topic of creating and using an openapi-based API development and testing environment which uses complimentary Swagger Editor and Swagger Codegen Docker Containers.

Commands shown in the document pull the required Docker Images from the docker hub and create containers that use them.

Once the environment is up and running, API development and testing can be undertaken as required, and containers stopped and remove once the task is over. See https://github.com/mwczapski/Swagger_Development_Workflow for package artefacts.

Jul 12

Among other activities, I design and implement RESTful APIs. I use the VSCode, the Swagger Editor, the Swagger UI and the Swagger Codegen, or a combination, as needed. I also use Docker for containerisation as much as possible because I dislike burdening my host machine with all manner of software and the resulting need to manage versions, version conflicts, etc..

The intent of the document is to provide a reader with the means to create a self-contained Docker container for generating and running back-end stubs based on an openapi.yaml specification for API-First development based on the Docker Image at https://hub.docker.com/repository/docker/mwczapski/swagger_codegen.

The container will have the means to:

  • Use the Swagger Codegen to generate and run NodeJS stubs (and Java8 stubs, and Bash stubs) to facilitate API testing
  • Convert YAML specification documents to JSON and the vice versa

Please see https://github.com/mwczapski/Swagger_Codegen_3_Docker_Container for package artefacts.

Jul 11

Among other activities, I design and implement RESTful APIs. I use the VSCode, the Swagger Editor, the Swagger UI and the Swagger Codegen, or a combination, as needed. I also use Docker for containerisation as much as possible because I dislike burdening my host machine with all manner of software and the resulting need to manage versions, version conflicts, etc..

To help myself, and others, I documented the steps necessary to create a Docker Image to host the Swagger Codegen so that Docker container using that Image can be spun up as needed in seconds and destroyed as quickly when no longer required. The intent of the document is to provide a set of steps that a reader can use to create a self-contained Docker container for API-First development using latest Swagger Codegen (3.x) and OpenAPI (2 or 3). The intent of the image is to provide a reader with the means to create a self-contained Docker container for generating and running back-end stubs based on an openapi.yaml specification for API-First development. 

The container will have the means to:

  • Use the Swagger Codegen to generate and run NodeJS stubs (and Java8 stubs, and Bash stubs) to facilitate API testing
  • Convert YAML specification documents to JSON and the vice versa

The image is based on the latest Docker node image with extras as discussed herein.

The image uses:

  • `swagger-codegen-cli/3.0.20` to support YAML to JSON conversion and generation of client and server stubs based on the OpenAPI Specification / Swagger file for supported languages. `swagger-codegen-cli` requires Java 8, which is installed during container setup.
  • `sqlite3`
  • `nodemon` server
  • `http-server` server

Please see https://github.com/mwczapski/Swagger_Codegen_3_Docker_Container for package artefacts.

Jul 05

Among other activities, I design and implement RESTful APIs. I use the VSCode, the Swagger Editor, the Swagger UI and the Swagger Codegen, or a combination, as needed. I also use Docker for containerisation as much as possible because I dislike burdening my host machine with all manner of software and the resulting need to manage versions, version conflicts, etc..

To help myself, and others, I documented the steps necessary to use the Swagger Editor Image to rapidly spin up and begin to use the Docker container using that Image.

The intent of this document is to provide information on how to create a self-contained Docker container for API-First development using the mwczapski/swagger-editor:1.0.0 image hosted on Docker Hub, and to begin to use it.

The container provides the means to:

  • Run the Swagger Editor Server
  • Convert YAML specification documents to JSON and the vice versa

Please see  https://github.com/mwczapski/Swagger_Editor_3_Docker_Container for package artefacts.

Jul 04

Among other activities, I design and implement RESTful APIs. I use the VSCode, the Swagger Editor, the Swagger UI and the Swagger Codegen, or a combination, as needed. I also use Docker for containerisation as much as possible because I dislike burdening my host machine with all manner of software and the resulting need to manage versions, version conflicts, etc..

To help myself, and others, I documented the steps necessary to create a Docker Image to host the Swagger Editor so that Docker container using that Image can be spun up as needed in seconds and destroyed as quickly when no longer required. The intent of the document is to provide a set of steps that a reader can use to create a self-contained Docker container for API-First development using latest Swagger Editor (3.x) and OpenAPI (2 or 3).

The Image is the basis for a container that will have the means to:

  • Run the Swagger Editor Server
  • Convert YAML specification documents to JSON and the vice versa

The container is based on the latest Docker node image with extras.

The container uses:

  • Swagger Editor Distributable (swagger-editor-dist)
  • swagger-codegen-cli/3.0.20 to support YAML to JSON conversion and generation of client and server stubs based on the OpenAPI Specification / Swagger file for supported languages. swagger-codegen-cli requires Java 8, which is installed during container setup.
  • nodemon server
  • http-server server

Please see  https://github.com/mwczapski/Swagger_Editor_3_Docker_Container for package artefacts.

May 24

I find VS Code to be a great free development editor and my activities involve a deal of development for the Linux platform. I like to be able to run the editor on Windows and build and run in the target environments using Docker as means to spin up lightweight containers for different projects with different technology stacks.

Scripts in this package facilitate creation of a Docker Container, based on the docker image created using scripts in the package Git Client Docker Container, with a Git Client that you can choose to configure to work in conjunction with the Private GIT Server. This container can be configured to work as a remote container environment for VS Code development on Windows. Please see  https://github.com/mwczapski/windows_vscode_development_in_linux_docker_container for RAEADME and package artifacts.

May 18

The package named in this article provides detailed steps for creating a Docker Container that runs a git client.

Scripts in this package facilitate creation of a Docker Image and a Docker Container with a Git Client that can be used with, or to test, the private GIT Server. The image uses the git distribution from the Debian Jesse repository. The container can be used as the basis for a development environment, upon which to build a development environment with the appropriate tools like NodeJS, Java, etc..

The image is based on bitnami/minideb:jessie image as at early May 2020.

The image is 156MB in size.

The image will be saved as the gitclient:1.0.0 Docker Image if the 01_create_git_client_baseline_image.sh script is run from the …./gitclient/_commonUtils directory and, if the user requests it, will also be uploaded to a remote docker repository, which must be defined. Please see https://github.com/mwczapski/git_client_docker_container for RAEADME and package artifacts.

May 05

The package named in this article provides detailed steps for creating a Docker Container that runs a private git server.

Scripts in the package facilitate creation of a Docker Image and a Docker Container with a private GIT Server. The image uses the most recent GIT distribution (2.26 at the time of this writing). The container can be used to provide docker-network-wide Git repository for small to medium size teams working on projects whose sources cannot or should not be stored in cloud-hosted Git repositories. Small to medium start-ups or small companies might be examples.

The image is based on bitnami/minideb:jessie image as at early May 2020.

Installing latest Git from sources, and pre-requisites for building Git from sources, blows the image up from about 51MB (bitnami/minideb:jessie) to about 778MB during the build process, and then shrinks it back to 238MB once the build is finished and build tools are removed.

The image is saved as the `gitserver:1.0.0` Docker Image and, if the user invokes the script with the correct argument, also uploaded to a remote docker repository, which must be defined (see later). Please see https://github.com/mwczapski/private_gitserver_docker_container for RAEADME and package artifacts.

preload preload preload