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

Various Search model properties need to be authored as x-nullable: true #10226

Closed
31 tasks done
heaths opened this issue Jul 22, 2020 · 4 comments · Fixed by #10245 or #10293
Closed
31 tasks done

Various Search model properties need to be authored as x-nullable: true #10226

heaths opened this issue Jul 22, 2020 · 4 comments · Fixed by #10245 or #10293
Assignees
Labels
Search Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@heaths
Copy link
Member

heaths commented Jul 22, 2020

We're finding in the Azure Cognitive Search SDK for .NET that quite a few model properties need to be authored as x-nullable because the service implementation may return them as null.

See https://github.com/Azure/azure-sdk-for-net/blob/80ff0d075221715e3eb8e8645eac2cef203e7c8f/sdk/search/Azure.Search.Documents/src/autorest.md#add-nullable-annotations for a current list. Should we add more, we can open a new issue with the difference. If possible, it would be great if the service team could validate the swagger authoring against the service implementation.

This should be fixed in 2020-06-30 and any current preview being updated.

  • SynonymMap
    • encryptionKey
  • SearchField
    • indexAnalyzer
    • searchAnalyzer
    • analyzer
  • ScoringProfile
    • text
  • SearchIndex
    • encryptionKey
    • corsOptions
  • BM25Similarity
    • k1
    • b
  • SearchIndexerDataSource
    • dataChangeDetectionPolicy
    • dataDeletionDetectionPolicy
  • SearchIndexer
    • disabled
    • schedule
    • parameters
  • TextTranslationSkill
    • suggestedFrom
  • IndexingParameters
    • batchSize
    • maxFailedItems
    • maxFailedItemsPerBatch
  • FieldMapping
    • mappingFunction
  • IndexerExecutionResult
    • endTime
@heaths heaths added Search Service Attention Workflow: This issue is responsible by Azure service team. labels Jul 22, 2020
@ghost
Copy link

ghost commented Jul 22, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @brjohnstmsft, @bleroy, @tjacobhi, @MarkHeff, @miwelsh.

@brjohnstmsft
Copy link
Member

Thanks for reporting this @heaths. If I had to guess how we got into this state, it might be because we incorrectly assumed that x-nullable is true by default (or at least, treated that way for .NET reference types in C# codegen).

I'll fix all the core Search instances of this. @bleroy, can you please fix the indexer- and skillset-related instances?

@bleroy
Copy link
Contributor

bleroy commented Jul 23, 2020

@brjohnstmsft Sure.

@heaths
Copy link
Member Author

heaths commented Jul 25, 2020

This isn't complete. When referencing in commits, make sure a word separates keywords like "fixed", "resolves", etc. until complete so it doesn't get auto-closed.

@heaths heaths reopened this Jul 25, 2020
brjohnstmsft pushed a commit to brjohnstmsft/azure-rest-api-specs that referenced this issue Jul 29, 2020
jhendrixMSFT pushed a commit that referenced this issue Jul 30, 2020
…10293)

* [Azure Cognitive Search] Add missing x-nullable annotations, part 2

Fixes #10226

* [Azure Cognitive Search] Fix example causing validation error

Co-authored-by: Bruce Johnston <brjohnst@microsoft.com>
00Kai0 pushed a commit to 00Kai0/azure-rest-api-specs that referenced this issue Oct 12, 2020
…zure#10293)

* [Azure Cognitive Search] Add missing x-nullable annotations, part 2

Fixes Azure#10226

* [Azure Cognitive Search] Fix example causing validation error

Co-authored-by: Bruce Johnston <brjohnst@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Search Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
3 participants