Skip to content

Instantly share code, notes, and snippets.

View ponelat's full-sized avatar

Josh Ponelat ponelat

View GitHub Profile
@ponelat
ponelat / blows-up-panel.aas.yml
Created June 20, 2022 11:19
AsyncAPI blows up validation panel
asyncapi: '2.4.0'
info:
title: Petstore Kafka - Pets
version: '1.0.0'
description: |
A simple demo API based on a real implementation.
There are
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
asyncapi: '2.4.0'
info:
title: Petstore Kafka - Pets
version: '1.0.0'
description: |
A simple demo API based on a real implementation.
There are
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
@ponelat
ponelat / yaml-response.oas3.yml
Created June 3, 2022 10:13
OAS 3.0 - YAML response
openapi: 3.0.3
info:
title: YAML response
version: 1.0.0
paths:
/foo:
get:
responses:
default:
swagger: '2.0'
info:
title: Minimum OAS 2.0 definition
version: 1.0.0
paths:
/foo:
get:
responses:
@ponelat
ponelat / asyncapi-avro-example.yml
Created May 16, 2022 10:55
AsyncAPI - Avro example
asyncapi: 2.4.0
info:
title: Avro Example
version: 1.0.0
description: |-
An Avro example
channels:
'tweets':
description: This is the firehose of all Tweets
@ponelat
ponelat / swagger-2.yml
Last active April 20, 2022 15:52
Custom example
swagger: "2.0"
info:
version: 1.0.0
title: Custom example
paths:
/foo:
post:
description: Showing a custom example
@ponelat
ponelat / Binding.html
Created January 26, 2022 16:32
morearty-binding.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Binding</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ponelat
ponelat / openapi.oas2.yml
Created December 14, 2021 10:35
Multiple basePath not a feature
swagger: "2.0"
info:
title: Multiple basePaths
version: 1.0.0
description: |
Multiple basePaths aren't a feature in OpenAPI 2.0 (fka Swagger 2.0).
A basePath only works if _all_ your endpoints have it in there.
If your endpoints don't all share a comman basePath, you should leave it as `/` or blank.
@ponelat
ponelat / openapi.oas2.yml
Created November 30, 2021 11:57
timestamp issue in codegen
swagger: '2.0'
info:
title: Example to describe swagger codegen issue
description: |
Example Definition with Timestamp class as `java.sql.Timestamp` instead of custom model.
version: v1
paths:
/foo:
post:
@ponelat
ponelat / oas31.yml
Created November 29, 2021 10:05
Using oneOf in bodies
openapi: 3.0.3
info:
title: Example multiple responses
description: Example of multiple responses
version: 1.0.0
paths:
/one:
post:
description: Multiple request/response types.