Skip to content
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

Added a linter for numeric types #800

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
313cacf
feat: added a linter for numeric types
Tokesh Jan 17, 2025
4cc819c
chore: fixing link in changelog and fixing lint
Tokesh Jan 17, 2025
cf67505
chore: added tests for integer
Tokesh Jan 17, 2025
ce98335
debug: adding logs during unit tests in CI
Tokesh Jan 17, 2025
e355cc5
debug: added more logs in JsonSchemaValidator
Tokesh Jan 17, 2025
3d53083
debug: json stringify default schema to find the difference
Tokesh Jan 17, 2025
c600744
debug: moving back old code
Tokesh Jan 18, 2025
e811744
debug: moving back number linter check
Tokesh Jan 18, 2025
3b62e2c
debug: adding back expected
Tokesh Jan 18, 2025
8e5e3a0
debug: moving back response
Tokesh Jan 18, 2025
b3768c4
debug: console log story)
Tokesh Jan 18, 2025
255a696
debug: adding log of path
Tokesh Jan 18, 2025
90df914
debug: adding custom path
Tokesh Jan 18, 2025
c4faeff
debug: adding dirname path
Tokesh Jan 18, 2025
88cd4a9
debug: checking local and ci path
Tokesh Jan 18, 2025
14a90ad
debug: adding absolute path to check CI
Tokesh Jan 18, 2025
5402c53
debug: more logs
Tokesh Jan 18, 2025
7d66833
debug: testing default schema
Tokesh Jan 18, 2025
2498869
debug: added more parameter
Tokesh Jan 18, 2025
68a5cfe
debug: more parameters
Tokesh Jan 18, 2025
d8e4b88
debug: added unevaluated property
Tokesh Jan 18, 2025
9c2181e
debug:testing adding unevalutedItems
Tokesh Jan 18, 2025
a9decc4
debug: adding more options
Tokesh Jan 18, 2025
8d295a8
debug: editing option
Tokesh Jan 18, 2025
e2ff40f
debug: removing ci
Tokesh Jan 18, 2025
8613944
debug: editing package lock
Tokesh Jan 18, 2025
e1a2b2d
debug: logging parse in ajv
Tokesh Jan 18, 2025
0b6c491
debug: valid
Tokesh Jan 18, 2025
0e4ddf8
debug: comming back to main branch
Tokesh Jan 18, 2025
4930421
debug: coming back to main branch
Tokesh Jan 18, 2025
031cd73
chore: adding back lint check and tests for them
Tokesh Jan 22, 2025
73de733
chore: fix validate ci
Tokesh Jan 22, 2025
8cc8bcc
chore: fix from int 32 to int 64
Tokesh Jan 22, 2025
a7df28a
chore: moving time parameters from int32 to int64
Tokesh Jan 22, 2025
2052087
chore: changed insight API timestamp parameter to int64
Tokesh Jan 22, 2025
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added API spec for `adjust_pure_negative` for bool queries ([#641](https://github.com/opensearch-project/opensearch-api-specification/pull/641))
- Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620).
- Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643))
- Added a linter for numeric types ([#800](https://github.com/opensearch-project/opensearch-api-specification/pull/800))

### Changed

Expand Down
2 changes: 2 additions & 0 deletions spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3191,6 +3191,7 @@ components:
result:
oneOf:
- type: number
format: double
- type: string
- type: boolean
required:
Expand Down Expand Up @@ -3286,6 +3287,7 @@ components:
type: boolean
status:
type: number
format: double
required:
- _shards
- hits
Expand Down
1 change: 1 addition & 0 deletions spec/namespaces/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@ components:
oneOf:
- type: string
- type: number
format: double
style: form
cluster.health::query.wait_for_status:
in: query
Expand Down
2 changes: 2 additions & 0 deletions spec/namespaces/indices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,7 @@ components:
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by OpenSearch.
type: integer
format: int32
version:
$ref: '../schemas/_common.yaml#/components/schemas/VersionNumber'
_meta:
Expand Down Expand Up @@ -2222,6 +2223,7 @@ components:
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by OpenSearch.
type: integer
format: int32
version:
$ref: '../schemas/_common.yaml#/components/schemas/VersionNumber'
_meta:
Expand Down
2 changes: 2 additions & 0 deletions spec/namespaces/ism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ components:
description: Only perform the operation if the document has this primary term.
schema:
type: number
format: double
style: form
ism.add_policy::query.index:
name: index
Expand Down Expand Up @@ -504,6 +505,7 @@ components:
description: Only perform the operation if the document has this primary term.
schema:
type: number
format: double
style: form
ism.put_policies::query.if_seq_no:
name: if_seq_no
Expand Down
3 changes: 3 additions & 0 deletions spec/namespaces/ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ components:
type: string
version:
type: integer
format: int32
protocol:
type: string
enum:
Expand Down Expand Up @@ -1291,6 +1292,7 @@ components:
$ref: '../schemas/ml._common.yaml#/components/schemas/Query'
size:
type: integer
format: int32
description: The number of connectors to return.
sort:
type: array
Expand Down Expand Up @@ -1347,6 +1349,7 @@ components:
$ref: '../schemas/ml._common.yaml#/components/schemas/Query'
size:
type: integer
format: int32
description: The number of agents to return.
sort:
type: array
Expand Down
1 change: 1 addition & 0 deletions spec/namespaces/rollups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,5 @@ components:
description: Only perform the operation if the document has this primary term.
schema:
type: number
format: double
style: form
4 changes: 4 additions & 0 deletions spec/namespaces/sm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ components:
description: 'The starting index (default: 0)'
schema:
type: integer
format: int32

sm.update_policy::path.policy_name:
name: policy_name
Expand All @@ -252,6 +253,7 @@ components:
required: true
schema:
type: integer
format: int32

sm.update_policy::query.if_primary_term:
name: if_primary_term
Expand All @@ -260,6 +262,7 @@ components:
required: true
schema:
type: integer
format: int32

sm.delete_policy::path.policy_name:
name: policy_name
Expand Down Expand Up @@ -300,6 +303,7 @@ components:
The number of policies to return.
schema:
type: integer
format: int32

sm.get_policies::query.queryString:
name: queryString
Expand Down
3 changes: 3 additions & 0 deletions spec/namespaces/transforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ components:
required: false
schema:
type: number
format: double
style: form
transforms.search::query.size:
name: size
Expand All @@ -246,6 +247,7 @@ components:
required: false
schema:
type: number
format: double
style: form
transforms.search::query.from:
name: from
Expand All @@ -254,6 +256,7 @@ components:
required: false
schema:
type: number
format: double
style: form
transforms.search::query.search:
name: search
Expand Down
Loading
Loading