Closed zijchen closed 2 years ago
Same table from extract:
CREATE TABLE [SwaggerPetstore.Models].[NewPet] (
[Id] INT NOT NULL,
[Name] NVARCHAR (4000) NOT NULL,
[Tag] NVARCHAR (4000) NULL,
CONSTRAINT [PK_NewPet] PRIMARY KEY CLUSTERED ([Id] ASC)
);
This is how SMO generates scripts
Options:
It turns out that there's no SMO option for formatting output nicely, so the option 1 is out. 2 would involve adding a call to Tools Service to pipe the capability down to ScriptDom... maybe not worth it. I think 3 is a fine balance, and has the added bonus of using the language server to determine correctness, which is the future.
@zijchen thoughts?
Yeah I agree. Option 2 is overkill unless we find other uses for ScriptDom. 3 sounds best to me
Closing as by design (from SMO) for now.
Current formatting when generating sqlproj from Open API spec: