Skip to content

edit intelligent search events api#1546

Merged
julia-rabello merged 12 commits intomasterfrom
review/intelligent-search-events-api
Mar 23, 2026
Merged

edit intelligent search events api#1546
julia-rabello merged 12 commits intomasterfrom
review/intelligent-search-events-api

Conversation

@julia-rabello
Copy link
Copy Markdown
Contributor

@julia-rabello julia-rabello commented Nov 6, 2025

EDU-14886

Types of changes

  • New content (endpoints, descriptions or fields from scratch)
  • Improvement (make an endpoint's title or description even better)
  • Spelling and grammar accuracy (self-explanatory)

Changelog

Do not forget to update your changes to our Developer Portal's changelog. Did you create a release note?

  • Yes, I already created a release note about this change.
  • No, but I am going to.

@julia-rabello julia-rabello requested review from a team and garrucho November 6, 2025 17:09
@julia-rabello julia-rabello self-assigned this Nov 6, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 6, 2025

Thanks for your contribution. The .json file will be checked now with Spectral.

Copy link
Copy Markdown
Contributor

@PedroAntunesCosta PedroAntunesCosta left a comment

Choose a reason for hiding this comment

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

Spectral

I recommend solving spectral alerts before merging.

title

We don't usually document the title param. I recommend removing it from all fields. But I noticed It's a pattern in this API predating this PR, so I guess it's ok if you'd prefer to tackle this in a future, API-wide, PR.

@julia-rabello
Copy link
Copy Markdown
Contributor Author

julia-rabello commented Mar 17, 2026

@PedroAntunesCosta

I fixed some Spectral errors.
The 7 Spectral errors remaining are false positives caused by limitations in Spectral's validation engine when handling OpenAPI 3.0 oneOf schemas. The request-example-parallel-to-schema error incorrectly expects a single example field when we correctly use examples (plural) at the content-type level per OpenAPI 3.0 standards. The remaining oas3-valid-media-example errors occur because Spectral is incorrectly cross-validating examples against wrong schemas (e.g., flagging "Search Click" examples for missing operator fields that only Query schemas require).

c:/Users/julia.alexandre/Documents/GitHub/openapi-schemas/VTEX - Intelligent Search Events API - Headless.json
  40:44  error  request-example-parallel-to-schema  The example for request body must be at the same level as the schema (as siblings), not nested inside schema properties. Place the example at the content-type level alongside the schema.  paths./event.post.requestBody.content.application/json
  74:45  error  oas3-valid-media-example            "value" property must match exactly one schema in oneOf                                
                                                                                                     paths./event.post.requestBody.content.application/json.examples['Search Query'].value
  87:45  error  oas3-valid-media-example            "value" property must have required property "operator"                                
                                                                                                     paths./event.post.requestBody.content.application/json.examples['Search Click'].value
  87:45  error  oas3-valid-media-example            "value" property must match exactly one schema in oneOf                                
                                                                                                     paths./event.post.requestBody.content.application/json.examples['Search Click'].value
 119:45  error  oas3-valid-media-example            "value" property must match exactly one schema in oneOf                                
                                                                                                     paths./event.post.requestBody.content.application/json.examples['Search Autocomplete Query'].value
 132:45  error  oas3-valid-media-example            "value" property must have required property "operator"                                
                                                                                                     paths./event.post.requestBody.content.application/json.examples['Search Autocomplete Click'].value
 132:45  error  oas3-valid-media-example            "value" property must match exactly one schema in oneOf                                
                                                                                                     paths./event.post.requestBody.content.application/json.examples['Search Autocomplete Click'].value

✖ 7 problems (7 errors, 0 warnings, 0 infos, 0 hints)

I will remove the titles in another PR.

@julia-rabello julia-rabello merged commit fa04605 into master Mar 23, 2026
0 of 3 checks passed
@julia-rabello julia-rabello deleted the review/intelligent-search-events-api branch March 23, 2026 12:17
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.

2 participants