Skip to content

Instantly share code, notes, and snippets.

View clounie's full-sized avatar

Bruce Clounie clounie

View GitHub Profile
@clounie
clounie / openapi-v3.0.1.yaml
Created May 26, 2019 10:41
OpenAPI 3.0.1 Spec, defined in YAML
# Validations to make:
# typeToClassMappings -
# * Must have no duplicates
# * All Java classes must exist
#
# types -
# * Must have no duplicates
# * Each type.name must exist as a key in typeToClassMappings
# * Each type.fields.*.type|mapKeyType|mapValueType must exist as a key in typeToClassMappings
# * Each type referenced in fields has one and only one definition somewhere else
@clounie
clounie / Test.java
Created June 12, 2018 15:21
Example files with Bankdata/gradle-swagger-plugin
package net.nw.test;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
@clounie
clounie / Description.txt
Created August 19, 2016 23:18
winston-logsene exception problem
If you throw an exception, winston-logsene isn't sending the log.
Take the example below. I went into logsene-js to add some logs for context, which are noted below.
Then run `LOGSENE_TOKEN=xxxxxxxxxx node test.js` to see the result.
It works fine with a short-running process (i.e. when `q()` is commented out). However, if you throw an exception to end the process, LogseneJS doesn't send it.