Skip to content

Commit b02b4ad

Browse files
committed
Update testsuite to reflect a change in class name generation (lower class class names are camel case now) in NJsonSchema
1 parent 9565a52 commit b02b4ad

8 files changed

Lines changed: 178 additions & 178 deletions

src/NSwag.CodeGeneration.CSharp.Tests/Snapshots/JIRA_OpenAPI.verified.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82655,7 +82655,7 @@ namespace MyNamespace
8265582655
/// DEPRECATED
8265682656
/// </summary>
8265782657
[Newtonsoft.Json.JsonProperty("attributes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
82658-
public System.Collections.Generic.ICollection<attributes> Attributes { get; set; }
82658+
public System.Collections.Generic.ICollection<Attributes2> Attributes { get; set; }
8265982659

8266082660
/// <summary>
8266182661
/// Defines the projects that the option is available in. If the scope is not defined, then the option is available in all projects.
@@ -92193,7 +92193,7 @@ namespace MyNamespace
9219392193
/// Defines the behavior of the option in the project.If notSelectable is set, the option cannot be set as the field's value. This is useful for archiving an option that has previously been selected but shouldn't be used anymore.If defaultValue is set, the option is selected by default.
9219492194
/// </summary>
9219592195
[Newtonsoft.Json.JsonProperty("attributes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
92196-
public System.Collections.Generic.ICollection<Attributes2> Attributes { get; set; }
92196+
public System.Collections.Generic.ICollection<Attributes3> Attributes { get; set; }
9219792197

9219892198
/// <summary>
9219992199
/// The ID of the project that the option's behavior applies to.
@@ -97330,7 +97330,7 @@ namespace MyNamespace
9733097330
{
9733197331
[Newtonsoft.Json.JsonProperty("levels", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
9733297332
[System.ComponentModel.DataAnnotations.MaxLength(2)]
97333-
public System.Collections.Generic.ICollection<levels> Levels { get; set; }
97333+
public System.Collections.Generic.ICollection<Levels2> Levels { get; set; }
9733497334

9733597335
}
9733697336

@@ -97874,7 +97874,7 @@ namespace MyNamespace
9787497874
/// </summary>
9787597875
[Newtonsoft.Json.JsonProperty("events", Required = Newtonsoft.Json.Required.Always, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
9787697876
[System.ComponentModel.DataAnnotations.Required]
97877-
public System.Collections.Generic.ICollection<events> Events { get; set; } = new System.Collections.ObjectModel.Collection<events>();
97877+
public System.Collections.Generic.ICollection<Events2> Events { get; set; } = new System.Collections.ObjectModel.Collection<Events2>();
9787897878

9787997879
/// <summary>
9788097880
/// A list of field IDs. When the issue changelog contains any of the fields, the webhook `jira:issue_updated` is sent. If this parameter is not present, the app is notified about all field updates.
@@ -100073,7 +100073,7 @@ namespace MyNamespace
100073100073
/// Can contain multiple field values of following types depending on `type` key
100074100074
/// </summary>
100075100075
[Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "type")]
100076-
public partial class fields
100076+
public partial class Fields2
100077100077
{
100078100078
/// <summary>
100079100079
/// If `true`, will try to retain original non-null issue field values on move.
@@ -100122,7 +100122,7 @@ namespace MyNamespace
100122100122
/// </summary>
100123100123
[Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Always)]
100124100124
[System.ComponentModel.DataAnnotations.Required]
100125-
public System.Collections.Generic.IDictionary<string, fields> Fields { get; set; } = new System.Collections.Generic.Dictionary<string, fields>();
100125+
public System.Collections.Generic.IDictionary<string, Fields2> Fields { get; set; } = new System.Collections.Generic.Dictionary<string, Fields2>();
100126100126

100127100127
}
100128100128

@@ -102664,7 +102664,7 @@ namespace MyNamespace
102664102664

102665102665
}
102666102666

102667-
public enum attributes
102667+
public enum Attributes2
102668102668
{
102669102669

102670102670
[System.Runtime.Serialization.EnumMember(Value = @"notSelectable")]
@@ -103188,7 +103188,7 @@ namespace MyNamespace
103188103188

103189103189
}
103190103190

103191-
public enum Attributes2
103191+
public enum Attributes3
103192103192
{
103193103193

103194103194
[System.Runtime.Serialization.EnumMember(Value = @"notSelectable")]
@@ -103786,7 +103786,7 @@ namespace MyNamespace
103786103786

103787103787
}
103788103788

103789-
public enum levels
103789+
public enum Levels2
103790103790
{
103791103791

103792103792
[System.Runtime.Serialization.EnumMember(Value = @"WARNING")]
@@ -103854,7 +103854,7 @@ namespace MyNamespace
103854103854

103855103855
}
103856103856

103857-
public enum events
103857+
public enum Events2
103858103858
{
103859103859

103860103860
[System.Runtime.Serialization.EnumMember(Value = @"jira:issue_created")]

src/NSwag.CodeGeneration.TypeScript.Tests/Snapshots/JIRA_OpenAPI_Angular.verified.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65919,7 +65919,7 @@ export interface IIssueFieldOption {
6591965919
/** Details of the projects the option is available in. */
6592065920
export class IssueFieldOptionConfiguration implements IIssueFieldOptionConfiguration {
6592165921
/** DEPRECATED */
65922-
attributes?: attributes[];
65922+
attributes?: Attributes2[];
6592365923
/** Defines the projects that the option is available in. If the scope is not defined, then the option is available in all projects. */
6592465924
scope?: IssueFieldOptionScopeBean;
6592565925

@@ -65965,7 +65965,7 @@ export class IssueFieldOptionConfiguration implements IIssueFieldOptionConfigura
6596565965
/** Details of the projects the option is available in. */
6596665966
export interface IIssueFieldOptionConfiguration {
6596765967
/** DEPRECATED */
65968-
attributes?: attributes[];
65968+
attributes?: Attributes2[];
6596965969
/** Defines the projects that the option is available in. If the scope is not defined, then the option is available in all projects. */
6597065970
scope?: IssueFieldOptionScopeBean;
6597165971
}
@@ -83937,7 +83937,7 @@ export class Project implements IProject {
8393783937
/** The category the project belongs to. */
8393883938
readonly projectCategory?: ProjectCategory;
8393983939
/** The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes) of the project. */
83940-
readonly projectTypeKey?: projectTypeKey;
83940+
readonly projectTypeKey?: ProjectTypeKey3;
8394183941
/** Map of project properties */
8394283942
readonly properties?: { [key: string]: any; };
8394383943
/** The date when the project is deleted permanently. */
@@ -84151,7 +84151,7 @@ export interface IProject {
8415184151
/** The category the project belongs to. */
8415284152
projectCategory?: ProjectCategory;
8415384153
/** The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes) of the project. */
84154-
projectTypeKey?: projectTypeKey;
84154+
projectTypeKey?: ProjectTypeKey3;
8415584155
/** Map of project properties */
8415684156
properties?: { [key: string]: any; };
8415784157
/** The date when the project is deleted permanently. */
@@ -86209,7 +86209,7 @@ export interface IProjectRoleUser {
8620986209

8621086210
export class ProjectScopeBean implements IProjectScopeBean {
8621186211
/** Defines the behavior of the option in the project.If notSelectable is set, the option cannot be set as the field's value. This is useful for archiving an option that has previously been selected but shouldn't be used anymore.If defaultValue is set, the option is selected by default. */
86212-
attributes?: Attributes2[];
86212+
attributes?: Attributes3[];
8621386213
/** The ID of the project that the option's behavior applies to. */
8621486214
id?: number;
8621586215

@@ -86254,7 +86254,7 @@ export class ProjectScopeBean implements IProjectScopeBean {
8625486254

8625586255
export interface IProjectScopeBean {
8625686256
/** Defines the behavior of the option in the project.If notSelectable is set, the option cannot be set as the field's value. This is useful for archiving an option that has previously been selected but shouldn't be used anymore.If defaultValue is set, the option is selected by default. */
86257-
attributes?: Attributes2[];
86257+
attributes?: Attributes3[];
8625886258
/** The ID of the project that the option's behavior applies to. */
8625986259
id?: number;
8626086260
}
@@ -96728,7 +96728,7 @@ export interface IValidationOptionsForCreate {
9672896728

9672996729
/** The level of validation to return from the API. If no values are provided, the default would return `WARNING` and `ERROR` level validation results. */
9673096730
export class ValidationOptionsForUpdate implements IValidationOptionsForUpdate {
96731-
levels?: levels[];
96731+
levels?: Levels2[];
9673296732

9673396733
constructor(data?: IValidationOptionsForUpdate) {
9673496734
if (data) {
@@ -96769,7 +96769,7 @@ export class ValidationOptionsForUpdate implements IValidationOptionsForUpdate {
9676996769

9677096770
/** The level of validation to return from the API. If no values are provided, the default would return `WARNING` and `ERROR` level validation results. */
9677196771
export interface IValidationOptionsForUpdate {
96772-
levels?: levels[];
96772+
levels?: Levels2[];
9677396773
}
9677496774

9677596775
/** An operand that is a user-provided value. */
@@ -97772,7 +97772,7 @@ export interface IWebhook {
9777297772
/** A list of webhooks. */
9777397773
export class WebhookDetails implements IWebhookDetails {
9777497774
/** The Jira events that trigger the webhook. */
97775-
events!: events[];
97775+
events!: Events2[];
9777697776
/** A list of field IDs. When the issue changelog contains any of the fields, the webhook `jira:issue_updated` is sent. If this parameter is not present, the app is notified about all field updates. */
9777797777
fieldIdsFilter?: string[];
9777897778
/** A list of issue property keys. A change of those issue properties triggers the `issue_property_set` or `issue_property_deleted` webhooks. If this parameter is not present, the app is notified about all issue property updates. */
@@ -97848,7 +97848,7 @@ export class WebhookDetails implements IWebhookDetails {
9784897848
/** A list of webhooks. */
9784997849
export interface IWebhookDetails {
9785097850
/** The Jira events that trigger the webhook. */
97851-
events: events[];
97851+
events: Events2[];
9785297852
/** A list of field IDs. When the issue changelog contains any of the fields, the webhook `jira:issue_updated` is sent. If this parameter is not present, the app is notified about all field updates. */
9785397853
fieldIdsFilter?: string[];
9785497854
/** A list of issue property keys. A change of those issue properties triggers the `issue_property_set` or `issue_property_deleted` webhooks. If this parameter is not present, the app is notified about all issue property updates. */
@@ -102984,14 +102984,14 @@ export interface IWorkspaceDataPolicy {
102984102984
}
102985102985

102986102986
/** Can contain multiple field values of following types depending on `type` key */
102987-
export class fields implements Ifields {
102987+
export class Fields2 implements IFields2 {
102988102988
/** If `true`, will try to retain original non-null issue field values on move. */
102989102989
retain?: boolean | undefined;
102990102990
value?: any;
102991102991

102992102992
protected _discriminator: string;
102993102993

102994-
constructor(data?: Ifields) {
102994+
constructor(data?: IFields2) {
102995102995
if (data) {
102996102996
for (var property in data) {
102997102997
if (data.hasOwnProperty(property))
@@ -103001,7 +103001,7 @@ export class fields implements Ifields {
103001103001
if (!data) {
103002103002
this.retain = true;
103003103003
}
103004-
this._discriminator = "fields";
103004+
this._discriminator = "Fields2";
103005103005
}
103006103006

103007103007
init(_data?: any) {
@@ -103011,9 +103011,9 @@ export class fields implements Ifields {
103011103011
}
103012103012
}
103013103013

103014-
static fromJS(data: any): fields {
103014+
static fromJS(data: any): Fields2 {
103015103015
data = typeof data === 'object' ? data : {};
103016-
let result = new fields();
103016+
let result = new Fields2();
103017103017
result.init(data);
103018103018
return result;
103019103019
}
@@ -103028,7 +103028,7 @@ export class fields implements Ifields {
103028103028
}
103029103029

103030103030
/** Can contain multiple field values of following types depending on `type` key */
103031-
export interface Ifields {
103031+
export interface IFields2 {
103032103032
/** If `true`, will try to retain original non-null issue field values on move. */
103033103033
retain?: boolean | undefined;
103034103034
value?: any;
@@ -103104,7 +103104,7 @@ export interface ITargetClassification {
103104103104
/** Field mapping for mandatory fields in target */
103105103105
export class TargetMandatoryFields implements ITargetMandatoryFields {
103106103106
/** Contains the value of mandatory fields */
103107-
fields!: { [key: string]: fields; };
103107+
fields!: { [key: string]: Fields2; };
103108103108

103109103109
constructor(data?: ITargetMandatoryFields) {
103110103110
if (data) {
@@ -103124,7 +103124,7 @@ export class TargetMandatoryFields implements ITargetMandatoryFields {
103124103124
this.fields = {} as any;
103125103125
for (let key in _data["fields"]) {
103126103126
if (_data["fields"].hasOwnProperty(key))
103127-
(<any>this.fields)![key] = _data["fields"][key] ? fields.fromJS(_data["fields"][key]) : new fields();
103127+
(<any>this.fields)![key] = _data["fields"][key] ? Fields2.fromJS(_data["fields"][key]) : new Fields2();
103128103128
}
103129103129
}
103130103130
}
@@ -103153,7 +103153,7 @@ export class TargetMandatoryFields implements ITargetMandatoryFields {
103153103153
/** Field mapping for mandatory fields in target */
103154103154
export interface ITargetMandatoryFields {
103155103155
/** Contains the value of mandatory fields */
103156-
fields: { [key: string]: fields; };
103156+
fields: { [key: string]: Fields2; };
103157103157
}
103158103158

103159103159
/** Status mapping for statuses in source workflow to respective target status in target workflow. */
@@ -104370,7 +104370,7 @@ export enum MultiSelectFieldOptions {
104370104370
REMOVE_ALL = "REMOVE_ALL",
104371104371
}
104372104372

104373-
export enum attributes {
104373+
export enum Attributes2 {
104374104374
NotSelectable = "notSelectable",
104375104375
DefaultValue = "defaultValue",
104376104376
}
@@ -104539,7 +104539,7 @@ export enum ProjectAssigneeType {
104539104539
UNASSIGNED = "UNASSIGNED",
104540104540
}
104541104541

104542-
export enum projectTypeKey {
104542+
export enum ProjectTypeKey3 {
104543104543
Software = "software",
104544104544
Service_desk = "service_desk",
104545104545
Business = "business",
@@ -104594,7 +104594,7 @@ export enum ProjectPayloadProjectTypeKey {
104594104594
Product_discovery = "product_discovery",
104595104595
}
104596104596

104597-
export enum Attributes2 {
104597+
export enum Attributes3 {
104598104598
NotSelectable = "notSelectable",
104599104599
DefaultValue = "defaultValue",
104600104600
}
@@ -104840,7 +104840,7 @@ export enum Levels {
104840104840
ERROR = "ERROR",
104841104841
}
104842104842

104843-
export enum levels {
104843+
export enum Levels2 {
104844104844
WARNING = "WARNING",
104845104845
ERROR = "ERROR",
104846104846
}
@@ -104868,7 +104868,7 @@ export enum Events {
104868104868
Issue_property_deleted = "issue_property_deleted",
104869104869
}
104870104870

104871-
export enum events {
104871+
export enum Events2 {
104872104872
JiraIssue_created = "jira:issue_created",
104873104873
JiraIssue_updated = "jira:issue_updated",
104874104874
JiraIssue_deleted = "jira:issue_deleted",

0 commit comments

Comments
 (0)