-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support circular refs #1835
Conversation
- switch to our forked json schema ref parser - bundle http operations - validate circular data properly - dynamically generate data for circular structures - tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's build derez in fp-ts
style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with the following spec:
openapi: 3.0.0
info:
title: Test API
version: '1.0'
servers:
- url: 'http://localhost:3000'
paths:
'/dog/{id}':
parameters:
- schema:
type: string
name: id
in: path
required: true
get:
summary: Get A Dog
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Dog'
components:
schemas:
Dog:
title: Dog
type: object
properties:
id:
type: number
name:
type: string
breed:
type: string
parent:
$ref: '#/components/schemas/Dog'
And when the response from that endpoint:
{
"id":0,
"name":"string",
"breed":"string",
"parent":{
"id":0,
"name":"string",
"breed":"string",
"parent":{}
}
}
So working well for me.
Just a few comments/questions.
- bump stoplight json in http
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Addresses #1456
Blocked By stoplightio/json#90
Summary
Checklist