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
jimschubert / README.md
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:

.bak/bisect/3364/
├── openapi-simple.json
├── script.sh
└── templates
    └── openapi-yaml
        └── openapi.mustache
@jimschubert
jimschubert / openapi-generator-cli.sh
Last active July 7, 2018 04:19
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
# OPENAPI_GENERATOR_VERSION
# e.g.
# export OPENAPI_GENERATOR_VERSION=3.1.0
# openapi-generator-cli.sh
@jimschubert
jimschubert / evaluate.sh
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
ROOT=/Users/jim/projects/openapi-generator
targetfile=samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt
echo "Building $(git rev-parse --short HEAD)."
mvn -B clean package install 2>&1 >/dev/null
@jimschubert
jimschubert / sum.txt
Last active January 7, 2018 02:41
Swagger Codegen Build PR #7301
MD5: 5b8915a26c0cfa2953e7b2dad677d938
@jimschubert
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.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
/*
Copyright 2017 Bryan Keller (https://github.com/widget-)
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@jimschubert
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: https://crate.io/docs/reference/hello.html
services:
crate01:
image: crate
hostname: crate01
ports:
- "4200:4200"
@jimschubert
jimschubert / new.sh
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
jimschubert / chrome-aliases.sh
Created May 5, 2017 01:13
Chrome aliases for mac
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
alias chrome-canary="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
alias chromium="/Applications/Chromium.app/Contents/MacOS/Chromium"