microsoft / microsoft/typespec

JsonSchema max call stack with circular types

Open
#7,844 0 comments 0 reactions 0 assignees View on GitHub
bug emitter:json-schema triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

```tsp

import "@typespec/json-schema";

@JsonSchema.jsonSchema
model Test {
a: string;
nested: {
b: string;
parent?: Test.nested::type;
};
}

```

[Playground Link](https://typespec.io/playground/?e=%40typespec%2Fjson-schema&c=aW1wb3J0ICJAdHlwZXNwZWMvanNvbi1zY2hlbWEiOwoKQEpzb25TxQ8uxBvGCwptb2RlbCBUZXN0IHsKICBhOiBzdHJpbmc7CiAgbmVzdGVkOsUZICBizBsgIHBhcmVudD86xTwuxys6xH7EIH07Cn0K&options=%7B%22options%22%3A%7B%22%40typespec%2Fjson-schema%22%3A%7B%22file-type%22%3A%22json%22%7D%7D%7D&vs=%7B%7D)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.