Skip to content

Commit 242310b

Browse files
committed
Fix IP location APIs
1 parent bfb0845 commit 242310b

File tree

6 files changed

+86
-91
lines changed

6 files changed

+86
-91
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 35 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/ingest/_types/Database.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ export class DatabaseConfiguration {
3434

3535
maxmind?: Maxmind
3636
ipinfo?: Ipinfo
37-
readonly web?: Web
38-
readonly local?: Local
37+
}
38+
39+
export class DatabaseConfigurationFull extends DatabaseConfiguration {
40+
web?: Web
41+
local?: Local
3942
}
4043

4144
export class Maxmind {
@@ -47,5 +50,5 @@ export class Ipinfo {}
4750
export class Web {}
4851

4952
export class Local {
50-
readonly type: string
53+
type: string
5154
}

specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { DatabaseConfiguration } from '@ingest/_types/Database'
20+
import { DatabaseConfigurationFull } from '@ingest/_types/Database'
2121
import { Id } from '@_types/common'
2222
import { long } from '@_types/Numeric'
2323
import { EpochTime, UnitMillis } from '@_types/Time'
@@ -30,5 +30,5 @@ class DatabaseConfigurationMetadata {
3030
id: Id
3131
version: long
3232
modified_date_millis: EpochTime<UnitMillis>
33-
database: DatabaseConfiguration
33+
database: DatabaseConfigurationFull
3434
}

specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* under the License.
1818
*/
1919

20-
import { Maxmind } from '@ingest/_types/Database'
20+
import { DatabaseConfiguration } from '@ingest/_types/Database'
2121
import { RequestBase } from '@_types/Base'
22-
import { Id, Name } from '@_types/common'
22+
import { Id } from '@_types/common'
2323
import { Duration } from '@_types/Time'
2424

2525
/**
@@ -46,12 +46,6 @@ export interface Request extends RequestBase {
4646
* @server_default 30s */
4747
timeout?: Duration
4848
}
49-
body: {
50-
/** The provider-assigned name of the IP geolocation database to download. */
51-
name: Name
52-
/** The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading.
53-
* At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured.
54-
*/
55-
maxmind: Maxmind
56-
}
49+
/** @codegen_name configuration */
50+
body: DatabaseConfiguration
5751
}

0 commit comments

Comments
 (0)