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

Remove the expand option on the describe route #1755

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Conversation

bfops
Copy link
Collaborator

@bfops bfops commented Sep 27, 2024

Description of Changes

The expand option on the describe route didn't do much - it just omitted the schema field from the result.

This PR removes it, and the corresponding --brief/-b flag on the CLI subcommand.

API and ABI breaking changes

Yes, we're removing some functionality. As far as we know, nobody relies on this.

Expected complexity level and risk

2

Testing

Smoketests still passing

@@ -222,7 +222,7 @@ impl<'a> EntityDef<'a> {
}
}

fn entity_description_json(description: WithTypespace<EntityDef>, expand: bool) -> Option<Value> {
fn entity_description_json(description: WithTypespace<EntityDef>) -> Option<Value> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bfops bfops added release-0.12 api-break A PR that breaks some user-visible API labels Sep 27, 2024
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

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

Seems fine to me

if module_def && expand.is_some() {
return Err((
StatusCode::BAD_REQUEST,
"expand and module_def cannot both be specified",
Copy link
Collaborator Author

@bfops bfops Sep 27, 2024

Choose a reason for hiding this comment

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

@coolreader18 why was this constraint here? Does it invalidate the returned thing somehow? (eg something about the typespace?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just because they do opposite things - expand makes the hacky representation more detailed, while module_def uses a non-hacky representation.

@bfops bfops added this pull request to the merge queue Sep 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 30, 2024
@bfops bfops added this pull request to the merge queue Sep 30, 2024
Merged via the queue into master with commit dc4457b Sep 30, 2024
7 of 8 checks passed
@bfops bfops deleted the bfops/remove-expand branch September 30, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-break A PR that breaks some user-visible API release-0.12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants