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

Update API generator to use new OpenAPI specification #609

Merged
merged 14 commits into from
Apr 17, 2024

Conversation

Xtansia
Copy link
Collaborator

@Xtansia Xtansia commented Apr 16, 2024

Description

Update API generator to use new OpenAPI specification

Fixes #580

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Xtansia added 14 commits April 11, 2024 13:22
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
…accept comma-separated lists.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few changes here that looks breaking API-wise, e.g. HealthStatus replaces WaitForStatus, etc.

Either bump major version in this PR and add UPGRADING.md, or add backwards compatible code?

Indices,
[EnumMember(Value = "shards")]
Shards
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a breaking API change?

@@ -281,13 +300,6 @@ public string AwarenessAttribute
set => Q("awareness_attribute", value);
}

/// <summary>Specify the level of detail for returned information.</summary>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another potentially breaking change.

@Xtansia
Copy link
Collaborator Author

Xtansia commented Apr 16, 2024

There are a few changes here that looks breaking API-wise, e.g. HealthStatus replaces WaitForStatus, etc.

Either bump major version in this PR and add UPGRADING.md, or add backwards compatible code?

main is already developing the next major version (2.x) and includes other breaking changes. I'll make an UPGRADING.md

@dblock dblock merged commit 553f7d1 into opensearch-project:main Apr 17, 2024
39 of 46 checks passed
@Xtansia Xtansia deleted the feat/update-api-generator branch April 17, 2024 21:23
Xtansia added a commit to Xtansia/opensearch-net that referenced this pull request Aug 14, 2024
…ject#609)

* Update RestSpecDownloader

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Improve Enum formatting

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Patch request body references

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Description changes

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Improve type mapping

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Correct component and composable template APIs which do not actually accept comma-separated lists.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Unify enums `Health` & `WaitForStatus` to `HealthStatus`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Change `NodeNames` & `NodeIds` from `string` to `string[]`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Rename `GroupBy` enum to `TasksGroupBy`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Correct `Level` params

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Rename `SampleType` enum to `NodesSampleType`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Remove `QueryString` suffixing

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Improve enum generation

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Re-generate enums

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 553f7d1)
Xtansia added a commit that referenced this pull request Aug 17, 2024
* Implement the `cat.pit_segments` and `cat.segment_replication` operations (#527)

* Implement `cat.pit_segments` and `cat.all_pit_segments`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

Allow body on get/head

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Implement `cat.segment_replication`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Add changelog entry

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit c3deb70)

* Update API generator to use new OpenAPI specification (#609)

* Update RestSpecDownloader

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Improve Enum formatting

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Patch request body references

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Description changes

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Improve type mapping

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Correct component and composable template APIs which do not actually accept comma-separated lists.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Unify enums `Health` & `WaitForStatus` to `HealthStatus`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Change `NodeNames` & `NodeIds` from `string` to `string[]`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Rename `GroupBy` enum to `TasksGroupBy`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Correct `Level` params

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Rename `SampleType` enum to `NodesSampleType`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Remove `QueryString` suffixing

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Improve enum generation

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Re-generate enums

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 553f7d1)

* Bump YamlDotNet from 15.1.2 to 15.1.6 (#663)

* Bump YamlDotNet from 15.1.2 to 15.1.6

Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 15.1.2 to 15.1.6.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](aaubry/YamlDotNet@v15.1.2...v15.1.6)

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 26a619c)

* Updated location of the API spec. (#671)

Signed-off-by: dblock <dblock@amazon.com>
(cherry picked from commit 645fa9e)

* Bump NSwag.Core from 14.0.7 to 14.0.8 (#678)

* Bump NSwag.Core from 14.0.7 to 14.0.8

Bumps [NSwag.Core](https://github.com/RicoSuter/NSwag) from 14.0.7 to 14.0.8.
- [Release notes](https://github.com/RicoSuter/NSwag/releases)
- [Changelog](https://github.com/RicoSuter/NSwag/blob/master/CHANGELOG.md)
- [Commits](RicoSuter/NSwag@v14.0.7...v14.0.8)

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---
updated-dependencies:
- dependency-name: NSwag.Core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 74668a9)

* Bump YamlDotNet from 15.1.6 to 15.3.0 (#677)

* Bump YamlDotNet from 15.1.6 to 15.3.0

Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 15.1.6 to 15.3.0.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](aaubry/YamlDotNet@v15.1.6...v15.3.0)

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit efbae03)

* Re-generate against latest OpenAPI specification (#713)

* Re-generate against latest OpenAPI specification

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Update tests

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 275203b)

* Bump YamlDotNet from 15.3.0 to 16.0.0 (#721)

* Bump YamlDotNet from 15.3.0 to 16.0.0

Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 15.3.0 to 16.0.0.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](aaubry/YamlDotNet@v15.3.0...v16.0.0)

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 81c9937)

* Re-generate client code using latest OpenSearch API specification (2024-07-22) (#720)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Xtansia <1222964+Xtansia@users.noreply.github.com>
(cherry picked from commit e0fbd07)

* Bump NSwag.Core from 14.0.8 to 14.1.0 (#731)

* Bump NSwag.Core from 14.0.8 to 14.1.0

Bumps [NSwag.Core](https://github.com/RicoSuter/NSwag) from 14.0.8 to 14.1.0.
- [Release notes](https://github.com/RicoSuter/NSwag/releases)
- [Changelog](https://github.com/RicoSuter/NSwag/blob/master/CHANGELOG.md)
- [Commits](RicoSuter/NSwag@v14.0.8...v14.1.0)

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
---
updated-dependencies:
- dependency-name: NSwag.Core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
(cherry picked from commit fbfb823)

* Add support for indices.stats (#753)

* Add support for indices.stats

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Add changelog entry

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Fix tests

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Fix another test

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Fix more tests

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 43ba0de)

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update code generator to use new version of OpenAPI specification
2 participants