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

Generator: Add Custom Extension Findable #656

Merged
merged 11 commits into from
Sep 11, 2024
Merged

Conversation

pierre-emmanuelJ
Copy link
Member

Description

From the spec findable x-go-findable 1 and 2 it's building the custom findable we want.
By default, it's remain name 1 and id 2 but now you can for example give

for elastic-ip you can point:
1 - id
2 - ip

and findable will generate a findable func with idOrIP parameter to be found

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • For a new resource or new attributes: test added/updated

Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
@elkezza elkezza self-requested a review September 11, 2024 13:24
Copy link

@elkezza elkezza left a comment

Choose a reason for hiding this comment

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

lgtm :)

v3/README.md Outdated Show resolved Hide resolved
Co-authored-by: Predrag Janosevic <predrag.janosevic@exoscale.com>
v3/README.md Show resolved Hide resolved
v3/README.md Show resolved Hide resolved
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
@pierre-emmanuelJ pierre-emmanuelJ merged commit 5c6f1a0 into master Sep 11, 2024
6 checks passed
@pierre-emmanuelJ pierre-emmanuelJ deleted the custom-listable branch September 11, 2024 14:09
pierre-emmanuelJ pushed a commit that referenced this pull request Sep 12, 2024
# Description

The update of the Go version to go1.23 forces all the users of the API
client to upgrade to go1.23.

A lib should avoid forcing to upgrade Go for compatibility reasons,
especially in a bug fix.

The update of Go is related to the update of
`github.com/pb33f/libopenapi` to v0.18.0 inside the PR
#656.

`github.com/pb33f/libopenapi@v0.18.0` uses go1.23 because of the usage
of the new `iter` package from go1.23
(pb33f/libopenapi#319).

This is only related to the generator package, this package is not used
by the users of the API client.

So I created a dedicated module for the generator: the dependencies of
the generator will be isolated inside this module, and will have no
impact on the API client.

This module doesn't need release, it's just a "local" module.

The target `make generate` still works as before.

This will not impact users who have already updated to go1.23.

---

Side note:

The usage of the vendoring for a lib is mainly useless because the
vendor folder is not included inside the module distributed by the Go
proxies.
Also, Go proxies are here to ensure that a lib cannot disappear: if the
GitHub repository is deleted, the Go proxies will still serve the module
(even if it's a pseudo-version).
So I recommend removing the vendor directories (at least for v3 and the
generator).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants