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

Open-api: update prefix param description #9870

Closed
wants to merge 1 commit into from

Conversation

ajantha-bhat
Copy link
Member

No description provided.

@ajantha-bhat ajantha-bhat changed the title Open-api: Make prefix optional as per description Open-api: update prefix param description Mar 5, 2024
@@ -1444,7 +1444,7 @@ components:
schema:
type: string
required: true
description: An optional prefix in the path
description: Prefix in the path
Copy link
Member Author

Choose a reason for hiding this comment

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

It is actually a required field. Cannot be optional.

I tried changing the field to optional. I get validation error as "in: path" params must be required.
So updated the description.

Copy link
Contributor

Choose a reason for hiding this comment

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

so should required be set to false then?

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean, if I set it to false (I tried changing the field to optional), validator will fail. So, I assumed Paths must be required and changed the description.

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the error you're seeing?

The prefix is optional, but it depends on the definition. We can also update the default to be an empty string.

Copy link
Member Author

Choose a reason for hiding this comment

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

If I change to required: false for prefix

Spec is invalid.
Issues:

	components.parameters.For path parameter prefix the required value should be true


Execution failed for task ':iceberg-open-api:validateRESTCatalogSpec'.
> Validation failed.

Copy link
Member Author

@ajantha-bhat ajantha-bhat Apr 10, 2024

Choose a reason for hiding this comment

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

Thanks @Fokko for digging more on this. Their goal for publishing V4 is end of 2024.

So, As of now (since spec is based on v3), it is a required field. So, lets update the description and merge this as it is confusing.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jbonofre, @nastra: WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

personally I would just leave things as they are and not change anything at this point

Copy link
Contributor

Choose a reason for hiding this comment

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

So, As of now (since spec is based on v3), it is a required field. So, lets update the description and merge this as it is confusing.

I'm also in favor of leaving it like this. It is just yet another thing we cannot express in the open-API specification, but the intent is that the prefix is optional.

Copy link
Member

Choose a reason for hiding this comment

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

I agree, let's keep as it is for now. As we have the new REST spec proposal, we can add a topic related to that.

@ajantha-bhat
Copy link
Member Author

ping.

@ajantha-bhat
Copy link
Member Author

cc: @jbonofre

Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 22, 2024
Copy link

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions bot closed this Oct 29, 2024
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.

4 participants