Skip to content

Instantly share code, notes, and snippets.

View DavidBiesack's full-sized avatar

David Biesack DavidBiesack

View GitHub Profile
@DavidBiesack
DavidBiesack / git-check-out.sh
Created June 23, 2022 18:02
git-check-out.sh
# My `git checkout` command. My `gb` (git branch) alias emits `co` commands as part of stdout:
#
# $ gb
# co 2022-06-21 09:59:27 -0400 bug/CUI-437-achPaymentInstruction-composition
# co 2022-06-21 09:49:16 -0400 * feature/CUI-304-wire-transfer-payment
# co 2022-06-16 18:25:32 +0000 master
#
# so I can use this `co` command to quicky check out a branch from within
# a comint shell buffer in Emacs by clicking on the desired line and pressing
# Enter to execute that line as a shell command
@DavidBiesack
DavidBiesack / git-branch.sh
Created June 23, 2022 18:01
git-branch.sh
#!/usr/bin/env bash
# My `gb` alias for `git branch` runs this
# With any command line args, simply run `git branch` with those args.
# With no args, lists the branches, sorted by date. Add a `co` command at the top
# so I can use my `co` command to quicky check out a branch from within
# a comint shell buffer in Emacs by clicking on the desired line and pressing
# Enter to execute that line as a shell command
if [[ $# == 0 ]]
then
@DavidBiesack
DavidBiesack / openapi.yaml
Created April 20, 2022 17:28
openapi-generator issue with allOf and string type schemas
openapi: 3.0.3
info:
title: openapi-generator
description: Error in typescript-angular, not generating resourceId or timestamp interfaces or inheritance;
not generating `string` type for non-object schemas.
version: 0.1.0
contact:
name: Apiture
servers:
- url: /openapi-generator/issues
@DavidBiesack
DavidBiesack / audit-false-positive.json
Created December 30, 2021 01:47
audit false positive in OpenAPI Audit
{
"openapi": "3.0.0",
"info": {
"title": "audit-defect",
"version": "1.0",
"contact": {
"name": "David Biesack",
"email": "[email protected]"
},
"description": "Show how audit reports a required property `name` does not exist when in fact it exists via the `allOf` schema composition."
@DavidBiesack
DavidBiesack / openapi-generator-date-models.yaml
Last active November 15, 2021 16:29
openapi-generator issue
openapi: 3.0.0
info:
title: Dates
description: Date schemas
version: 0.0.1
servers:
- url: /dates
tags:
- name: Dates
description: Dates
@DavidBiesack
DavidBiesack / openapi-generator-required.yaml
Last active November 12, 2020 18:31
Show that openapi-generator does not honor required properties for typescript-axios; see https://github.com/OpenAPITools/openapi-generator/issues/7930
openapi: 3.0.2
info:
title: allOf and requried fields
description: >-
demonstrate issues with openapi-generator for typescript-axios for
schema composition with `allOf` and `required` fields
version: 0.0.1
contact:
name: Apiture
url: 'https://developer.apiture.com'
@DavidBiesack
DavidBiesack / widdershinsExample.yaml
Created August 8, 2018 13:11
widdershins not resolving external $ref schema
swagger: '2.0'
info:
title: Widdershins example
description: Demonstrate $ref for external schema
version: 0.1.0
schemes:
- http
basePath: /widdershinsRefExample
@DavidBiesack
DavidBiesack / money.json
Created August 8, 2018 13:00
money JSON Schema
{
"description": "An amount of money in a specific currency.",
"properties": {
"value": {
"description": "The net monetary value. A negative amount denotes a debit; a positive amount a credit. The numeric value is represented as a string so that it can be exact with no loss of precision.",
"example": "3456.78",
"type": "string"
},
"currency": {
"description": "The [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) for this monetary value. This is always upper case ASCII. TODO: ISO 4217 defines three-character codes. However, ISO 4217 does not account for cryptocurrencies. Of note, DASH uses 4 characters.",
@DavidBiesack
DavidBiesack / sway.sh
Last active November 7, 2017 18:15
Command line shell script for running sway on an OpenAPI document from a console
#!/usr/bin/env node
// Validate an OpenAPI document using sway library, https://www.npmjs.com/package/sway
//
// Install node (npm) and then install sway to use this:
//
// npm install sway --save # (This is only needed once, to install sway)
//
// From original source by Taylor Singletary (@episod), as shared on APIEvangelists slack #openapi Oct 31 2017
//
// Usage if saved as `sway` in your PATH:
@DavidBiesack
DavidBiesack / simple-openapi.yaml
Last active May 17, 2017 19:24
simple-openapi.yaml for swagger-codegen issue
swagger: "2.0"
info:
title: Sample REST API
description: A sample REST API for swagger-codegen and apidoc
version: "1"
contact:
name: David Biesack
email: [email protected]