Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Always here to help.

Jim Schubert jimschubert

🎯
Always here to help.
View GitHub Profile
@jimschubert
jimschubert / README.md
Created Jul 22, 2019
Example bisect workflow for openapi-generator
View README.md

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 Jul 7, 2018
Script for running openapi-generator-cli
View openapi-generator-cli.sh
#!/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
git bisect evaluate example
View evaluate.sh
#!/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 Jan 7, 2018
Swagger Codegen Build PR #7301
View sum.txt
MD5: 5b8915a26c0cfa2953e7b2dad677d938
@jimschubert
jimschubert / Example.kt
Created Nov 1, 2017
Kotlin enum testing for Swagger Codegen
View Example.kt
/**
* 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.
View slack.css
/*
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 Jul 5, 2017
CrateDB evaluation via docker-compose
View docker-compose.yml
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
Create a new swagger codegen generator. Put in swagger-codegen root, chmod u+x, and run.
View new.sh
#!/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/';
View TokenAuthController.cs
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
Chrome aliases for mac
View chrome-aliases.sh
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"