Skip to content

Conversation

@joheredi
Copy link
Member

@joheredi joheredi commented Apr 1, 2021

Synapse is an autogenerated SDK with no convenience layer. This PR includes:

  • Update to the latest swagger version
  • Added some basic tests

Details on the new Swagger:
One of the main Swagger changes was an update to several types to any the reason behind this is that Autorest currently doesn't have a way to represent oneOf to indicate 2 possible types for inputs.

Once Autorest supports this we should see this updated to string | Foo instead of any

This is also reflecting some Typescript codegen changes to export operations interfaces instead of concrete classes.

/cc: @lmazuel

@ghost ghost added the Synapse label Apr 1, 2021
Copy link
Contributor

@chradek chradek left a comment

Choose a reason for hiding this comment

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

Seeing so many any fields in the API hurts, but I understand that work is being done on that and this is a beta.

I really like the interface generation going on, is that on in autorest by default?

Comment on lines +138 to +143
bucketName: any;
key?: any;
prefix?: any;
version?: any;
modifiedDatetimeStart?: any;
modifiedDatetimeEnd?: any;
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these really any types, or are these the oneOf types you mentioned in your post? Some things like bucketName, key, prefix, and even version I wouldn't expect to be anything other than a string.

Copy link
Contributor

Choose a reason for hiding this comment

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

Talked with @joheredi offline. These are oneOf types that will eventually be modeled as string | Foo (expression?)

I'd still like to understand what the expression would look like for these types but given this is a preview and autorest is making improvements on how to model these, I don'tt think this is blocking.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @chradek! For context here is some information on what this expression is:
Azure/azure-rest-api-specs#12924 (comment)

this.workspaceGitRepoManagement = new WorkspaceGitRepoManagement(this);
this.linkedService = new LinkedServiceImpl(this);
this.dataset = new DatasetImpl(this);
this.pipeline = new PipelineImpl(this);
Copy link
Contributor

Choose a reason for hiding this comment

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

@xirzec
Just thought you'd be interested...would this clash horribly with how you plan to expose the corev2 pipelines in clients? (Did we decide on just a field called pipeline or a different strategy?

import { BigDataPoolsListResponse, BigDataPoolsGetResponse } from "../models";

/** Interface representing a BigDataPools. */
export interface BigDataPools {
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh cool, you're essentially generating interfaces for clients now? That is new right?!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup @sarangan12 took on this change! We no longer need to expose the operation classes 😄

Co-authored-by: chradek <51000525+chradek@users.noreply.github.com>
@joheredi joheredi merged commit 03592a9 into Azure:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants