Skip to content

Instantly share code, notes, and snippets.

View jimschubert's full-sized avatar
Always here to help.

Jim Schubert jimschubert

Always here to help.
  • Richmond, VA
View GitHub Profile
jimschubert /
Created July 22, 2019 17:11
Example bisect workflow for openapi-generator

Create the following directory structure under .bak/bisect/3364/ with the file from this gist:

├── openapi-simple.json
└── templates
    └── openapi-yaml
        └── openapi.mustache
jimschubert /
Last active May 12, 2024 22:36
Script for running openapi-generator-cli
#!/usr/bin/env bash
# Save as openapi-generator-cli on your PATH. chmod u+x. Enjoy.
# This script will query github on every invocation to pull the latest released version.
# If you want repeatable executions, you can explicitly set a version via
# e.g.
jimschubert /
Created May 17, 2018 02:20
git bisect evaluate example
#!/usr/bin/env bash
# Evaluates a report that running multiple generators results in
# Pet#category being of type Object/Any rather than Category
set -e
echo "Building $(git rev-parse --short HEAD)."
mvn -B clean package install 2>&1 >/dev/null
jimschubert / sum.txt
Last active January 7, 2018 02:41
Swagger Codegen Build PR #7301
MD5: 5b8915a26c0cfa2953e7b2dad677d938
jimschubert / Example.kt
Created November 1, 2017 20:04
Kotlin enum testing for Swagger Codegen
* Reserved Words Issue
* A sample of reserved words being escaped and breaking serialization
* OpenAPI spec version: 1.0.0
* NOTE: This class is auto generated by the swagger code generator program.
* Do not edit the class manually.
Copyright 2017 Bryan Keller (
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
jimschubert / docker-compose.yml
Created July 5, 2017 03:22
CrateDB evaluation via docker-compose
version: '2'
# Run with docker-compose up -d
# Navigate to http://localhost:4200
# See Crate's getting started docs:
image: crate
hostname: crate01
- "4200:4200"
jimschubert /
Created May 25, 2017 16:09
Create a new swagger codegen generator. Put in swagger-codegen root, chmod u+x, and run.
#!/usr/bin/env bash
set -euo pipefail
usage() {
echo "Stubs out files for new generators" && \
echo "usage:" && \
echo "$0 [options]" && \
echo " Options:"
grep "[[:space:]].)\ #" $0 | tr -d "#" | sed -r 's/( \| \*)//' | sed -r 's/([a-z])\)/-\1/';
using System;
using System.IdentityModel.Tokens.Jwt;
using System.Net;
using System.Net.Http;
using System.Security.Claims;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
jimschubert /
Created May 5, 2017 01:13
Chrome aliases for mac
alias chrome="/Applications/Google\\ Chrome"
alias chrome-canary="/Applications/Google\ Chrome\\ Chrome\ Canary"
alias chromium="/Applications/"