You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the release of 2.1.0, I started seeing schema validation errors.
Below is an example where a field in an interface could be a string or a RegExp. Before 2.1, this worked because the generated just dropped the RegExp class.
Given the following interface:
exportinterfacePatternAdjustment{/** Id of the Adjustment, i.e. `short-compound` */id: string;/** RegExp pattern to match */regexp: string|RegExp;/** The amount of penalty to apply. */penalty: number;}
Output: v2.1.1
"PatternAdjustment": {
"additionalProperties": false,
"properties": {
"id": {
"description": "Id of the Adjustment, i.e. `short-compound`",
"markdownDescription": "Id of the Adjustment, i.e. `short-compound`",
"type": "string"
},
"penalty": {
"description": "The amount of penalty to apply.",
"markdownDescription": "The amount of penalty to apply.",
"type": "number"
},
"regexp": {
"anyOf": [
{
"type": "string"
},
{
"format": "regex", <-- Unknown format"type": "string"
}
],
"description": "RegExp pattern to match",
"markdownDescription": "RegExp pattern to match"
}
},
"required": [
"id",
"regexp",
"penalty"
],
"type": "object"
},
Output: v2.0.1
"PatternAdjustment": {
"additionalProperties": false,
"properties": {
"id": {
"description": "Id of the Adjustment, i.e. `short-compound`",
"markdownDescription": "Id of the Adjustment, i.e. `short-compound`",
"type": "string"
},
"penalty": {
"description": "The amount of penalty to apply.",
"markdownDescription": "The amount of penalty to apply.",
"type": "number"
},
"regexp": {
"description": "RegExp pattern to match",
"markdownDescription": "RegExp pattern to match",
"type": "string"
}
},
"required": [
"id",
"regexp",
"penalty"
],
"type": "object"
},
I'm going to try to work around this by creating a new type and using @hidden.
The text was updated successfully, but these errors were encountered:
Related to: #1921, #1927, and #1930
With the release of 2.1.0, I started seeing schema validation errors.
Below is an example where a field in an interface could be a string or a
RegExp
. Before 2.1, this worked because the generated just dropped theRegExp
class.Given the following
interface
:Output: v2.1.1
Output: v2.0.1
I'm going to try to work around this by creating a new type and using
@hidden
.The text was updated successfully, but these errors were encountered: