-
Notifications
You must be signed in to change notification settings - Fork 5
Add Custom Metadata overlay for SDK groups and PropertyDefinition narrowing #101
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a047946
Add Custom Metadata overlay for SDK groups and PropertyDefinition nar…
chinmaya-singal-glean e93c255
Merge remote-tracking branch 'origin/main' into custom-metadata-overlay
chinmaya-singal-glean 1fe06d7
Add smoke test for Custom Metadata SDK grouping
chinmaya-singal-glean 16bfc6b
Merge branch 'main' into custom-metadata-overlay
chinmaya-singal-glean 416c7ee
Unblock spec regen pipeline for Custom Metadata paths
chinmaya-singal-glean a48737e
Remove Custom Metadata SDK grouping smoke test
chinmaya-singal-glean File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| overlay: 1.0.0 | ||
| x-speakeasy-jsonpath: rfc9535 | ||
| info: | ||
| title: Speakeasy Modifications - Custom Metadata | ||
| version: 0.0.1 | ||
|
|
||
| actions: | ||
| # Custom Metadata - SDK grouping and method names | ||
| - target: $["paths"]["/rest/api/index/document/{docId}/custom-metadata/{groupName}"]["put"] | ||
| update: | ||
| x-speakeasy-name-override: upsert | ||
| x-speakeasy-group: indexing.customMetadata | ||
|
|
||
| - target: $["paths"]["/rest/api/index/document/{docId}/custom-metadata/{groupName}"]["delete"] | ||
| update: | ||
| x-speakeasy-name-override: delete | ||
| x-speakeasy-group: indexing.customMetadata | ||
|
|
||
| - target: $["paths"]["/rest/api/index/custom-metadata/schema/{groupName}"]["get"] | ||
| update: | ||
| x-speakeasy-name-override: getSchema | ||
| x-speakeasy-group: indexing.customMetadata | ||
|
|
||
| - target: $["paths"]["/rest/api/index/custom-metadata/schema/{groupName}"]["put"] | ||
| update: | ||
| x-speakeasy-name-override: upsertSchema | ||
| x-speakeasy-group: indexing.customMetadata | ||
|
|
||
| - target: $["paths"]["/rest/api/index/custom-metadata/schema/{groupName}"]["delete"] | ||
| update: | ||
| x-speakeasy-name-override: deleteSchema | ||
| x-speakeasy-group: indexing.customMetadata | ||
|
|
||
| # Introduce a Custom Metadata-specific PropertyDefinition schema that exposes only | ||
| # the fields applicable to Custom Metadata. The shared PropertyDefinition schema | ||
| # (used by the Datasource / Custom Properties API) carries fields like displayLabel, | ||
| # displayLabelPlural, uiOptions, hideUiFacet, uiFacetOrder, and group that are not | ||
| # relevant to Custom Metadata. We cannot strip those fields from PropertyDefinition | ||
| # itself without affecting the Indexing API surface, so we create a | ||
| # narrower schema scoped to Custom Metadata and re-point CustomMetadataSchema to it. | ||
| - target: $["components"]["schemas"] | ||
| update: | ||
| CustomMetadataPropertyDefinition: | ||
| type: object | ||
| description: The definition for a key within a Custom Metadata schema. Only the fields applicable to Custom Metadata are exposed. | ||
| properties: | ||
| name: | ||
| type: string | ||
| description: The name of the metadata key. | ||
| propertyType: | ||
| type: string | ||
| enum: | ||
| - TEXT | ||
| - PICKLIST | ||
| - TEXTLIST | ||
| - MULTIPICKLIST | ||
| description: The type of metadata key. This governs the search and faceting behavior. | ||
| skipIndexing: | ||
| type: boolean | ||
| description: If true then the property will not be indexed for retrieval and ranking. | ||
| required: | ||
| - name | ||
| - propertyType | ||
|
|
||
| # Re-point CustomMetadataSchema.metadataKeys to the narrower schema above. | ||
| - target: $["components"]["schemas"]["CustomMetadataSchema"]["properties"]["metadataKeys"] | ||
| update: | ||
| items: | ||
| $ref: '#/components/schemas/CustomMetadataPropertyDefinition' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, but it's unfortunate to need an overlay here.
I presume it's not feasible to change the upstream so that the type that is actually shared is one that has the common properties because the type is currently in use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be quite difficult to manage that since the upstream properties are used in a lot of places both internally and by external API users and having separate structs would require us to make a lot of updates to handle in internal indexing processors.
Additionally - for long term, we would ideally support the UI properties we are applies overlay for here for consistency but it hasn't been prioritized yet.