Skip to content

Commit

Permalink
Refactor QueryRulesetListItem into a types.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
kderusso committed Jul 27, 2023
1 parent 4958d8e commit bdb359f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 2 additions & 13 deletions specification/query_ruleset/list/QueryRulesetListResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,12 @@
* under the License.
*/

import { integer, long } from '@_types/Numeric'
import { Id } from '@_types/common'
import { long } from '@_types/Numeric'
import { QueryRulesetListItem } from './types'

export class Response {
body: {
count: long
results: QueryRulesetListItem[]
}
}

export class QueryRulesetListItem {
/**
* Ruleset unique identifier
*/
ruleset_id: Id
/**
* The number of rules associated with this ruleset
*/
rules_count: integer
}
31 changes: 31 additions & 0 deletions specification/query_ruleset/list/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { integer } from '@_types/Numeric'
import { Id } from '@_types/common'

export class QueryRulesetListItem {
/**
* Ruleset unique identifier
*/
ruleset_id: Id
/**
* The number of rules associated with this ruleset
*/
rules_count: integer
}

0 comments on commit bdb359f

Please sign in to comment.