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

[PROPOSAL] Turn warnings into errors #184

Closed
dblock opened this issue Jan 23, 2024 · 1 comment
Closed

[PROPOSAL] Turn warnings into errors #184

dblock opened this issue Jan 23, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dblock
Copy link
Member

dblock commented Jan 23, 2024

What/Why

What are you proposing?

Building the repo with ./gradlew build yields some warnings. Fix them and turn them into errors.

What problems are you trying to solve?

Avoid mistakes in the API specs during development time.

──  WARNING  ────────────────────────────────────────────── DefaultValueInUpdate
Shape: OpenSearch#Update
File:  /Users/dblock/source/opensearch-project/opensearch-api-specification/dblock-opensearch-api-specification/build/libs/opensearch-api-specification.jar!/META-INF/smithy/_global/update/operations.smithy:19:1

14| @xOperationGroup("update")
15| @xVersionAdded("1.0")
16| @suppress(["HttpUriConflict"])
17| @http(method: "POST", uri: "/{index}/_update/{id}")
18| @documentation("Updates a document with a script or partial document.")
19| operation Update {
  | ^

This update style operation has top-level input members marked with the @default
trait. It will be impossible to tell if the member was omitted or explicitly
provided. Affected members: [lang, refresh, require_alias, retry_on_conflict,
wait_for_active_shards]


──  WARNING  ────────────────────────────────────────────── DefaultValueInUpdate
Shape: OpenSearch#UpdateByQuery
File:  /Users/dblock/source/opensearch-project/opensearch-api-specification/dblock-opensearch-api-specification/build/libs/opensearch-api-specification.jar!/META-INF/smithy/_global/update_by_query/operations.smithy:20:1

15| @xVersionAdded("1.0")
16| @suppress(["HttpUriConflict"])
17| @http(method: "POST", uri: "/{index}/_update_by_query")
18| @documentation("Performs an update on every document in the index without chan…
19| for example to pick up a mapping change.")
20| operation UpdateByQuery {
  | ^

This update style operation has top-level input members marked with the @default
trait. It will be impossible to tell if the member was omitted or explicitly
provided. Affected members: [analyze_wildcard, conflicts, default_operator,
expand_wildcards, from, preference, requests_per_second, scroll_size, slices,
timeout, wait_for_active_shards, wait_for_completion]

SUCCESS: Validated 5401 shapes (WARNING: 2, NOTE: 1)

What is the developer experience going to be?

When building warnings cause build errors.

@nhtruong
Copy link
Collaborator

nhtruong commented Apr 2, 2024

We're no longer using Smithy or Gradle

@nhtruong nhtruong closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants