Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ testRule('xgen-IPA-110-collections-request-has-itemsPerPage-query-param', [
code: 'xgen-IPA-110-collections-request-has-itemsPerPage-query-param',
message: 'List method is missing query parameters.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -120,13 +120,13 @@ testRule('xgen-IPA-110-collections-request-has-itemsPerPage-query-param', [
code: 'xgen-IPA-110-collections-request-has-itemsPerPage-query-param',
message: 'List method is missing a itemsPerPage query parameter.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-110-collections-request-has-itemsPerPage-query-param',
message: 'List method is missing a itemsPerPage query parameter.',
path: ['paths', '/resourcesTwo', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -159,7 +159,7 @@ testRule('xgen-IPA-110-collections-request-has-itemsPerPage-query-param', [
code: 'xgen-IPA-110-collections-request-has-itemsPerPage-query-param',
message: 'itemsPerPage query parameter of List method must not be required.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -190,7 +190,7 @@ testRule('xgen-IPA-110-collections-request-has-itemsPerPage-query-param', [
code: 'xgen-IPA-110-collections-request-has-itemsPerPage-query-param',
message: 'itemsPerPage query parameter of List method must have a default value defined.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -222,7 +222,7 @@ testRule('xgen-IPA-110-collections-request-has-itemsPerPage-query-param', [
code: 'xgen-IPA-110-collections-request-has-itemsPerPage-query-param',
message: 'itemsPerPage query parameter of List method must have a default value of 100.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ testRule('xgen-IPA-110-collections-request-has-pageNum-query-param', [
code: 'xgen-IPA-110-collections-request-has-pageNum-query-param',
message: 'List method is missing query parameters.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -120,13 +120,13 @@ testRule('xgen-IPA-110-collections-request-has-pageNum-query-param', [
code: 'xgen-IPA-110-collections-request-has-pageNum-query-param',
message: 'List method is missing a pageNum query parameter.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-110-collections-request-has-pageNum-query-param',
message: 'List method is missing a pageNum query parameter.',
path: ['paths', '/resourcesTwo', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -159,7 +159,7 @@ testRule('xgen-IPA-110-collections-request-has-pageNum-query-param', [
code: 'xgen-IPA-110-collections-request-has-pageNum-query-param',
message: 'pageNum query parameter of List method must not be required.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -190,7 +190,7 @@ testRule('xgen-IPA-110-collections-request-has-pageNum-query-param', [
code: 'xgen-IPA-110-collections-request-has-pageNum-query-param',
message: 'pageNum query parameter of List method must have a default value defined.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -222,7 +222,7 @@ testRule('xgen-IPA-110-collections-request-has-pageNum-query-param', [
code: 'xgen-IPA-110-collections-request-has-pageNum-query-param',
message: 'pageNum query parameter of List method must have a default value of 1.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ testRule('xgen-IPA-110-collections-request-includeCount-not-required', [
code: 'xgen-IPA-110-collections-request-includeCount-not-required',
message: 'includeCount query parameter of List method must not be required.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -156,7 +156,7 @@ testRule('xgen-IPA-110-collections-request-includeCount-not-required', [
code: 'xgen-IPA-110-collections-request-includeCount-not-required',
message: 'includeCount query parameter of List method must not be required.',
path: ['paths', '/resources', 'get'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ testRule('xgen-IPA-110-collections-response-define-links-array', [
message:
'The response for collections should define a links array field, providing links to next and previous pages.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/json'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ testRule('xgen-IPA-110-collections-response-define-results-array', [
code: 'xgen-IPA-110-collections-response-define-results-array',
message: 'The response for collections must define an array of results containing the paginated resource.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/json'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ testRule('xgen-IPA-110-collections-use-paginated-prefix', [
message:
'List methods response must reference a paginated response schema. The response should reference a schema with "Paginated" prefix.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/json'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -151,21 +151,21 @@ testRule('xgen-IPA-110-collections-use-paginated-prefix', [
message:
'List methods response must reference a paginated response schema. The response should reference a schema with "Paginated" prefix.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/vnd.atlas.2024-08-05+json'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-110-collections-use-paginated-prefix',
message:
'List methods response must reference a paginated response schema. The schema is defined inline and must reference a predefined paginated schema.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/vnd.atlas.2024-01-01+json'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-110-collections-use-paginated-prefix',
message:
'List methods response must reference a paginated response schema. The List method response does not have a schema defined.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/vnd.atlas.2024-03-03+json'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -212,7 +212,7 @@ testRule('xgen-IPA-110-collections-use-paginated-prefix', [
code: 'xgen-IPA-110-collections-use-paginated-prefix',
message: 'The schema is defined inline and must reference a predefined paginated schema.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/json'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,25 +109,25 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
code: 'xgen-IPA-112-avoid-project-field-names',
message: 'Field name "project" should be avoided. Consider using "group" instead.',
path: ['components', 'schemas', 'SchemaName', 'properties', 'project'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-avoid-project-field-names',
message: 'Field name "projects" should be avoided. Consider using "groups" instead.',
path: ['components', 'schemas', 'SchemaName', 'properties', 'projects'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-avoid-project-field-names',
message: 'Field name "projectId" should be avoided. Consider using "group" instead.',
path: ['components', 'schemas', 'SchemaName', 'properties', 'projectId'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-avoid-project-field-names',
message: 'Field name "myProjectDetails" should be avoided. Consider using "group" instead.',
path: ['components', 'schemas', 'SchemaName', 'properties', 'myProjectDetails'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-avoid-project-field-names',
Expand All @@ -143,7 +143,7 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
'properties',
'projectId',
],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-avoid-project-field-names',
Expand All @@ -160,7 +160,7 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
'properties',
'projectId',
],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ testRule('xgen-IPA-112-boolean-field-names-avoid-is-prefix', [
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
message: 'Boolean field "isEnabled" should not use the "is" prefix. Use "enabled" instead.',
path: ['components', 'schemas', 'SchemaName', 'properties', 'isEnabled'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
message: 'Boolean field "isActive" should not use the "is" prefix. Use "active" instead.',
path: ['components', 'schemas', 'SchemaName', 'properties', 'isActive'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
message: 'Boolean field "isError" should not use the "is" prefix. Use "error" instead.',
path: ['components', 'schemas', 'SchemaName', 'properties', 'isError'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
Expand All @@ -136,7 +136,7 @@ testRule('xgen-IPA-112-boolean-field-names-avoid-is-prefix', [
'properties',
'isAvailable',
],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
Expand All @@ -153,7 +153,7 @@ testRule('xgen-IPA-112-boolean-field-names-avoid-is-prefix', [
'properties',
'isValid',
],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -235,13 +235,13 @@ testRule('xgen-IPA-112-boolean-field-names-avoid-is-prefix', [
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
message: 'Boolean field "isEnabled" should not use the "is" prefix. Use "enabled" instead.',
path: ['components', 'schemas', 'BooleanProperties', 'properties', 'isEnabled'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
message: 'Boolean field "isAdmin" should not use the "is" prefix. Use "admin" instead.',
path: ['components', 'schemas', 'User', 'properties', 'isAdmin'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
Expand All @@ -256,7 +256,7 @@ testRule('xgen-IPA-112-boolean-field-names-avoid-is-prefix', [
'properties',
'isEmailNotificationsEnabled',
],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
{
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
Expand All @@ -273,7 +273,7 @@ testRule('xgen-IPA-112-boolean-field-names-avoid-is-prefix', [
'properties',
'isCached',
],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down Expand Up @@ -316,7 +316,7 @@ testRule('xgen-IPA-112-boolean-field-names-avoid-is-prefix', [
code: 'xgen-IPA-112-boolean-field-names-avoid-is-prefix',
message: 'Boolean field "isMfaEnabled" should not use the "is" prefix. Use "mfaEnabled" instead.',
path: ['components', 'schemas', 'UserSettings', 'properties', 'isMfaEnabled'],
severity: DiagnosticSeverity.Warning,
severity: DiagnosticSeverity.Error,
},
],
},
Expand Down
Loading
Loading