Skip to content

Fix Serverless create index API examples#6414

Closed
ankikuma wants to merge 4 commits into
mainfrom
fix/serverless-create-index-examples
Closed

Fix Serverless create index API examples#6414
ankikuma wants to merge 4 commits into
mainfrom
fix/serverless-create-index-examples

Conversation

@ankikuma

@ankikuma ankikuma commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • Add Serverless-specific OpenAPI overlays for the create index API so examples no longer reference number_of_shards, number_of_replicas and routing.
  • Preserve existing Stack examples and language snippets unchanged.
  • Override the primary Console and client code samples on Serverless to use a minimal create-index request.

Test plan

Made with Cursor

Use Serverless-specific overlays so create index examples no longer
reference stack-only number_of_shards and number_of_replicas settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Following you can find the validation changes against the target branch for the APIs.

No changes detected.

You can validate these APIs yourself by using the make validate target.

@ankikuma ankikuma added backport skip-backport This pull request should not be backported and removed backport labels Jul 8, 2026
Remove existing x-codeSamples before updating them so bump does not
merge stack-only shard settings with the Serverless examples.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ankikuma
ankikuma requested a review from lcawl July 9, 2026 16:37
Override indicesCreateRequestExample3 so the aliases example no longer
includes stack-only routing settings on Serverless.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ankikuma

ankikuma commented Jul 9, 2026

Copy link
Copy Markdown
Author

@lcawl I see in IndexSettings.ts that number_of_shards and number_of_replicas are marked @availability stack but they still show up in examples.

Is the way I fixed this in this PR the best way to fix it, or is there some better automation that can remove these from examples ?

Also, while working on this I realized that we refer to the following GLOBALLY_REJECTED_PARAMETERS in many places in the serverless specs:
master_timout
routing
wait_for_active_shards

Can we fix this by tagging them as @availability stack ?

@lcawl

lcawl commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

I think your PR is a good case for fixing the broader issue, so I've created #6446 instead.

@ankikuma

Copy link
Copy Markdown
Author

Superceded by #6446

@ankikuma ankikuma closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-backport This pull request should not be backported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants