Skip to content

Instantly share code, notes, and snippets.

@krx252525
Created March 7, 2017 13:25
Show Gist options
  • Save krx252525/4fa841203321e3aa551d1103981cabbd to your computer and use it in GitHub Desktop.
Save krx252525/4fa841203321e3aa551d1103981cabbd to your computer and use it in GitHub Desktop.
The simplest spec that recreates issue where Swagger codegen Java client uses String instead of URL
swagger: '2.0'
host: 'example.com'
basePath: /
schemes:
- https
################################################################################
# Info #
################################################################################
info:
version: '1.0.0'
title: 'Sample API'
contact:
name: 'Keir-Rex'
license:
name: 'Free'
description: |
Sample of the problem I'm experiencing
paths:
#
# Subscribe
#
'/v1/api/sub':
post:
tags:
- Subscribe
summary: Create a subscription
responses:
200:
description: Subscription created
schema:
$ref: '#/definitions/Subscription'
################################################################################
# Definitions #
################################################################################
definitions:
Subscription:
title: Subscription
type: object
required:
- hook
properties:
hook:
type: string
format: url
description: The webhook endpoint to which notifications are pushed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment