Skip to content

Conversation

@danaelhe
Copy link

@danaelhe danaelhe commented Aug 6, 2025

Described the bug here:
#6801 (comment)

Now it can properly handle anyOf (e.g. here) of mixed types.

Example OpenAPI 3.0 spec:

    components:
        parameters:
            ssh_key_identifier:
                in: path
                name: ssh_key_identifier
                required: true
                description: Either the ID or the fingerprint of an existing SSH key.
                schema:
                    anyOf:
                    - $ref: '#/components/schemas/ssh_key_id'
                    - $ref: '#/components/schemas/ssh_key_fingerprint'
                example: 512189


....
        schema:
            ssh_key_id:
                type: integer
                description: >-
                    A unique identification number for this key. Can be used to embed a 
                    specific SSH key into a Droplet.
                readOnly: true
                example: 512189
            
            ssh_key_fingerprint:
                type: string
                description: >-
                    A unique identifier that differentiates this key from other keys using 
                    a format that SSH recognizes. The fingerprint is created when the key is
                    added to your account.
                readOnly: true
                example: 3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa
    

Now generates:

export interface KeysRequestBuilder extends BaseRequestBuilder<KeysRequestBuilder> {
    /**
     * Gets an item from the ApiSdk.v2.account.keys.item collection
     * @param ssh_key_identifier Either the ID or the fingerprint of an existing SSH key.
     * @returns {WithSsh_key_identifierItemRequestBuilder}
     */
     bySsh_key_identifier(ssh_key_identifier: string | number) : WithSsh_key_identifierItemRequestBuilder;
}

When before it was just allowing one type:
bySsh_key_identifier(ssh_key_identifier: number) : WithSsh_key_identifierItemRequestBuilder;

Re-ran our mocked tests and it all seems to pass...doesn't seem to have broke anything else 🤞

@danaelhe danaelhe requested a review from a team as a code owner August 6, 2025 16:08
@danaelhe
Copy link
Author

danaelhe commented Aug 6, 2025

@danaelhe the command you issued was incorrect. Please try again.

Examples are:

@microsoft-github-policy-service agree

and

@microsoft-github-policy-service agree company="your company"

show service level agreement

@danaelhe danaelhe closed this Aug 6, 2025
@danaelhe danaelhe reopened this Aug 6, 2025
@baywet
Copy link
Member

baywet commented Aug 6, 2025

@danaelhe Thanks for the contribution!

I think you got really close with the agreement. Try

@microsoft-github-policy-service agree company="digitalocean"

@danaelhe
Copy link
Author

danaelhe commented Aug 6, 2025

@danaelhe Thanks for the contribution!

I think you got really close with the agreement. Try

@microsoft-github-policy-service agree company="digitalocean"

Thanks so much!! Just double checking with legal on our side.

@danaelhe
Copy link
Author

danaelhe commented Aug 7, 2025

@microsoft-github-policy-service agree company="digitalocean"

@microsoft-github-policy-service agree company="digitalocean"

@danaelhe
Copy link
Author

danaelhe commented Aug 7, 2025

@danaelhe Thanks for the contribution!

I think you got really close with the agreement. Try

@microsoft-github-policy-service agree company="digitalocean"

all good now!

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Can you also add a changelog entry (unreleased, changed)

baywet
baywet previously approved these changes Aug 8, 2025
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thank you for making the changes!

@baywet baywet enabled auto-merge August 8, 2025 14:55
auto-merge was automatically disabled August 10, 2025 02:26

Head branch was pushed to by a user without write access

baywet
baywet previously approved these changes Aug 11, 2025
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thank you for making the changes!

@baywet
Copy link
Member

baywet commented Aug 11, 2025

@danaelhe there are a number of languages integration tests that are failing.
It boils down to those language not supporting union types, and the union type not being replaced by either a wrapper type, or the indexer by multiple methods (one for each type). All of that should happen in the refiner.
Let me know if you have any additional comments or questions.

@baywet
Copy link
Member

baywet commented Aug 13, 2025

@danaelhe integration tests are still failing because of the union types. Would you mind having a look please?

@baywet
Copy link
Member

baywet commented Aug 28, 2025

@danaelhe gentle reminder on the previous comment

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