Skip to content

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Jun 23, 2025

The sample code was not correctly enclosed in backticks (`), causing the code to be incorrectly rendered.

The sample code was not correctly enclosed in backticks (`), causing the code to be incorrectly rendered.
@rlazo rlazo requested a review from davidmotson June 23, 2025 12:47
Copy link
Contributor

Firebase AI Mock Responses Check ⚠️

A newer major version of the mock responses for Firebase AI unit tests is available. update_responses.sh should be updated to clone the latest version of the responses: v14.1

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @rlazo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a minor but important documentation issue by fixing the rendering of a code sample for the Schema.anyOf method. The change ensures that the example code is correctly displayed, improving the clarity and usability of the API reference for developers.

Highlights

  • Documentation Fix: Corrected the formatting of a code example for the Schema.anyOf method in Schema.kt to ensure proper rendering within the reference documentation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

github-actions bot commented Jun 23, 2025

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/Schema.Companion.html	2025-06-23 13:24:29.713298879 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/Schema.Companion.html	2025-06-23 13:20:58.552986880 +0000
@@ -104,9 +104,7 @@
         <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/Schema.html">Schema</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/Schema.Companion.html#anyOf(kotlin.collections.List)">anyOf</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/Schema.html">Schema</a>&gt;&nbsp;schemas)</pre>
         <p>Returns a <code><a href="/docs/reference/android/com/google/firebase/ai/type/Schema.html">Schema</a></code> representing a value that must conform to <em>any</em> (one of) the provided sub-schema.</p>
         <p>Example: A field that can hold either a simple userID or a more detailed user object.</p>
-        <p>Schema.anyOf( listOf( Schema.integer(description = &quot;User ID&quot;), Schema.obj(mapOf(</p>
-        <pre class="prettyprint">    &quot;userID&quot; to Schema.integer(description = &quot;User ID&quot;),<br>    &quot;username&quot; to Schema.string(description = &quot;Username&quot;)</pre>
-        <p>)) )</p>
+        <pre class="prettyprint">Schema.anyOf( listOf( Schema.integer(description = &quot;User ID&quot;), Schema.obj( mapOf(<br>    &quot;userID&quot; to Schema.integer(description = &quot;User ID&quot;),<br>    &quot;username&quot; to Schema.string(description = &quot;Username&quot;)<br>)))</pre>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/Schema.html	2025-06-23 13:24:29.721298815 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/Schema.html	2025-06-23 13:20:58.558986833 +0000
@@ -285,9 +285,7 @@
         <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/Schema.html">Schema</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/Schema.Companion.html#anyOf(kotlin.collections.List)">anyOf</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/Schema.html">Schema</a>&gt;&nbsp;schemas)</pre>
         <p>Returns a <code><a href="/docs/reference/android/com/google/firebase/ai/type/Schema.html">Schema</a></code> representing a value that must conform to <em>any</em> (one of) the provided sub-schema.</p>
         <p>Example: A field that can hold either a simple userID or a more detailed user object.</p>
-        <p>Schema.anyOf( listOf( Schema.integer(description = &quot;User ID&quot;), Schema.obj(mapOf(</p>
-        <pre class="prettyprint">    &quot;userID&quot; to Schema.integer(description = &quot;User ID&quot;),<br>    &quot;username&quot; to Schema.string(description = &quot;Username&quot;)</pre>
-        <p>)) )</p>
+        <pre class="prettyprint">Schema.anyOf( listOf( Schema.integer(description = &quot;User ID&quot;), Schema.obj( mapOf(<br>    &quot;userID&quot; to Schema.integer(description = &quot;User ID&quot;),<br>    &quot;username&quot; to Schema.string(description = &quot;Username&quot;)<br>)))</pre>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/Schema.html	2025-06-23 13:24:29.677299165 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/Schema.html	2025-06-23 13:20:58.524987100 +0000
@@ -206,9 +206,7 @@
         <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/Schema.Companion.html#anyOf(kotlin.collections.List)">anyOf</a>(schemas:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/Schema.html">Schema</a>&gt;):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/Schema.html">Schema</a></pre>
         <p>Returns a <code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/Schema.html">Schema</a></code> representing a value that must conform to <em>any</em> (one of) the provided sub-schema.</p>
         <p>Example: A field that can hold either a simple userID or a more detailed user object.</p>
-        <p>Schema.anyOf( listOf( Schema.integer(description = &quot;User ID&quot;), Schema.obj(mapOf(</p>
-        <pre class="prettyprint">    &quot;userID&quot; to Schema.integer(description = &quot;User ID&quot;),<br>    &quot;username&quot; to Schema.string(description = &quot;Username&quot;)</pre>
-        <p>)) )</p>
+        <pre class="prettyprint">Schema.anyOf( listOf( Schema.integer(description = &quot;User ID&quot;), Schema.obj( mapOf(<br>    &quot;userID&quot; to Schema.integer(description = &quot;User ID&quot;),<br>    &quot;username&quot; to Schema.string(description = &quot;Username&quot;)<br>)))</pre>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request addresses an issue where the sample code in the anyOf refdoc was not correctly enclosed in backticks, leading to incorrect rendering. The provided code suggestion aims to improve the readability of the code example by formatting it according to Kotlin conventions.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 23, 2025

Coverage Report 1

Affected Products

No changes between base commit (43491db) and merge commit (12f1554).

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/oE8P8xYmkg.html

Copy link
Contributor

github-actions bot commented Jun 23, 2025

Test Results

 24 files   - 20   24 suites   - 20   34s ⏱️ - 5m 45s
102 tests  - 34  102 ✅  - 34  0 💤 ±0  0 ❌ ±0 
204 runs   - 88  204 ✅  - 88  0 💤 ±0  0 ❌ ±0 

Results for commit c6aae10. ± Comparison against base commit 43491db.

This pull request removes 136 and adds 102 tests. Note that renamed tests count towards both.
com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelperTest ‑ testDebugAppCheckTestHelper_withDebugProviderDefaultApp_installsDebugProvider
com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelperTest ‑ testDebugAppCheckTestHelper_withDebugProviderNamedApp_installsDebugProvider
com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelperTest ‑ testDebugAppCheckTestHelper_withDebugProvider_noPreviousProvider_installsDebugProvider
com.google.firebase.appcheck.debug.testing.FirebaseAppCheckDebugTestingRegistrarTest ‑ testGetComponents
com.google.firebase.storage.AdaptiveStreamBufferTest ‑ advanceCachedBytes
com.google.firebase.storage.AdaptiveStreamBufferTest ‑ advanceStreamBytes
com.google.firebase.storage.AdaptiveStreamBufferTest ‑ bufferReachedEnd
com.google.firebase.storage.AdaptiveStreamBufferTest ‑ bufferResize
com.google.firebase.storage.AdaptiveStreamBufferTest ‑ readStream
com.google.firebase.storage.DeleteTest ‑ deleteBlob
…
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ citation parsed correctly
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ image rejected
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ long reply
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ prompt blocked for safety
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ short reply
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ stopped for recitation
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ citation returns correctly
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ invalid api key
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ long reply
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ response blocked for safety
…

♻️ This comment has been updated with latest results.

@rlazo rlazo requested a review from VinayGuthal June 23, 2025 12:57
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 23, 2025

Size Report 1

Affected Products

  • firebase-ai

    TypeBase (43491db)Merge (12f1554)Diff
    aar829 kB829 kB-9 B (-0.0%)
    apk (release)9.53 MB9.53 MB-8 B (-0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/1uBLQjgVxp.html

@rlazo rlazo merged commit 8329493 into main Jun 23, 2025
32 checks passed
@rlazo rlazo deleted the rl.anyof.fix branch June 23, 2025 23:59
@firebase firebase locked and limited conversation to collaborators Jul 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants