Граф коммитов

2556 Коммитов

Автор SHA1 Сообщение Дата
m-nash 9961dbefaa
Http type array (#4212)
Fixes https://github.com/microsoft/typespec/issues/3992
2024-08-20 16:15:02 +00:00
m-nash 2d4f55f921
Content helper (#4211)
Fixes https://github.com/microsoft/typespec/issues/4210
2024-08-20 01:58:19 +00:00
m-nash 197b7095fd
Http payload media type (#4209)
Fixes https://github.com/microsoft/typespec/issues/3980
2024-08-19 20:56:06 +00:00
Jorge Rangel 261fa52811
Handle repeatability header params in client (#4203)
Fixes: https://github.com/microsoft/typespec/issues/3936
2024-08-19 19:43:29 +00:00
m-nash da540e1e52
Input type factory (#4191)
Fixes https://github.com/microsoft/typespec/issues/3880
2024-08-19 16:27:45 +00:00
Crystal YU e29eaa73a3
onboard non-versioned cadl-ranch test project (#4200)
Fix https://github.com/microsoft/typespec/issues/3988
2024-08-19 03:31:28 +00:00
Srikanta bf7866aa56
Add HTTP client generator for Java (#4185) 2024-08-16 18:24:23 +00:00
Dapeng Zhang 71c221d4d9
bump tcgc version to `0.45.3` (#4194)
Bump the version of TCGC in order to fix the current issue in
implementing examples
2024-08-16 06:00:30 +00:00
Nisha Bhatia 5661859338
Update ModelFactory List/Dictionary Instantiation (#4188)
Resolves: https://github.com/microsoft/typespec/issues/4129

---------

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>
2024-08-15 19:40:19 +00:00
Crystal YU 1dc571145f
Emit decorator list (#3905)
Fix https://github.com/microsoft/typespec/issues/4031

When we specify the allowed-emit-decorators in emitter, TCGC will help
to emit out decoration information for each item (client, property,
operation), e.g final-state-var, our .NET input-Model need to contain
this information.

This PR will 

- emit decorators to all kind of models, operations and operations
- add reference resolve strategy in TypeSpecInputDecoratorInfoConverter
to support parse by reference
2024-08-15 08:13:27 +00:00
Wei Hu 2eac90cd1e
Bump version for TCGC (#4184) 2024-08-15 05:34:04 +00:00
JoshLove-msft cea699f73b
Add encode bytes coverage (#4174)
Fixes https://github.com/microsoft/typespec/issues/3971
2024-08-14 19:37:28 +00:00
m-nash 9dfdac7d38
Http client structure multi client (#4181)
Fixes https://github.com/microsoft/typespec/issues/3968
Fixes https://github.com/microsoft/typespec/issues/4170
2024-08-14 17:36:32 +00:00
iscai-msft 1795063dd9
add label for python emitter (#4172)
Co-authored-by: iscai-msft <isabellavcai@gmail.com>
2024-08-13 20:43:26 +00:00
m-nash 22e445f8c6
Bump to remove dir separator work around (#4180)
Removes work around for this fix
https://github.com/microsoft/typespec/pull/4173
2024-08-13 20:23:40 +00:00
Nisha Bhatia 3d8642232f
Update NamedTypeSymbolProviderTests.cs (#4177) 2024-08-13 19:32:23 +00:00
Timothee Guerin a27978471e
Merge compiler 0.59.1 hotfix back into main (#4176) 2024-08-13 19:02:05 +00:00
Timothee Guerin b9e465b94e
Merge Hotfix back into main (#4167) 2024-08-13 17:06:15 +00:00
Timothee Guerin 6567ec21bf
Fix regression using dep (#4157)
Previous PR https://github.com/microsoft/typespec/pull/4145/files fix an
issue with referencing items from another sub namespace and simplified
the logic but seems like this is making the
typespec-azure-resource-manager library error.

The way the library was written kinda makes it seems like there is
indeed an error but can't change that right now so just reverting as we
plan to get rid of this error anyway
2024-08-13 14:08:42 +00:00
Wei Hu 2c8d4e2185
Fix endpoint handling (#4164) 2024-08-13 11:00:59 +00:00
Wei Hu 67adf07c3f
Bump version for TSP and TCGC (#4134)
Fix https://github.com/microsoft/typespec/issues/3891
2024-08-13 06:44:13 +00:00
Nisha Bhatia ee03132f9b
Add BuildFields to NamedTypeSymbolProvider (#4140)
Resolves: https://github.com/microsoft/typespec/issues/3806
2024-08-13 06:23:45 +00:00
m-nash deca55d294
Add converage for http/client/naming (#4162)
Fixes https://github.com/microsoft/typespec/issues/3966
2024-08-13 05:06:19 +00:00
m-nash 5cdf871ecc
Set content if there is one (#4160)
Contributes to https://github.com/microsoft/typespec/issues/3966
2024-08-13 03:40:17 +00:00
m-nash 81f897739e
Fix assert validation logic for intput parameters (#4156)
Contributes to https://github.com/microsoft/typespec/issues/3966
2024-08-13 02:06:46 +00:00
m-nash be6c415f34
Add capability to use different types for enums on protocol vs convenience (#4154)
Fixes https://github.com/microsoft/typespec/issues/3953
2024-08-13 00:24:13 +00:00
Timothee Guerin 96b3347620
Do not register typespec lsp in playground (#4081)
fix [#3955](https://github.com/microsoft/typespec/issues/3955)
2024-08-13 00:18:29 +00:00
Christopher Radek eb4badacd6
tsp-openapi3 improve conversion of OpenAPI3 component schemas into TypeSpec data types (#4149)
Fixes #4080  and #4088

This also fixes a few bugs/rough edges around generating TypeSpec types
from OpenAPI3 component schemas.

Still 2 things to follow up with that I'll create issues for:
1. Support `allOf` with more than 1 member. Likely this will result in
spreading all the members, except extending 1 if there is 1 that has a
discriminator. (https://github.com/microsoft/typespec/issues/4152)
2. Place all component schemas under a `Schemas` namespace (and do
something similar for `Parameters`) to prevent name collisions.
(https://github.com/microsoft/typespec/issues/4151)

---------

Co-authored-by: Christopher Radek <Christopher.Radek@microsoft.com>
2024-08-12 22:45:36 +00:00
Timothee Guerin 4cced29b9d
Add hyperlinks to diagnostic documentation url (#4148)
Make the diagnostic code an hyperlink that point to the documentation
url

<img width="488" alt="image"
src="https://github.com/user-attachments/assets/dd6518be-b49f-4bf1-b4ca-ceed525922ff">

---------

Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
2024-08-12 22:26:35 +00:00
Srikanta b44b80fb4a
Migrate Java client emitter (#4045)
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2024-08-12 22:10:25 +00:00
Timothee Guerin 712aa4f385
Fix mapper node set in model expression (#4144)
fix [#3935](https://github.com/microsoft/typespec/issues/3935)

---------

Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
2024-08-12 22:05:30 +00:00
Timothee Guerin 3775eec3bc
Update resolution of options for formatting command in extension (#4064)
VSCode has this detectIndent setting which seems to prefer 4 space by
default and then update the TypeSpec formatter to format that way.
2024-08-12 21:57:59 +00:00
Timothee Guerin bd148022e9
Fix reference other sub-namespace (#4145)
fix [#3838](https://github.com/microsoft/typespec/issues/3838)
2024-08-12 21:56:49 +00:00
Timothee Guerin 88d22b0f48
Fix expression defined in alias doesn't have namespace assigned (#4146)
fix [#3438](https://github.com/microsoft/typespec/issues/3438)
2024-08-12 21:56:46 +00:00
Timothee Guerin 275d76e66a
Fix examples of model with extends (#4147)
fix #4113
2024-08-12 21:56:42 +00:00
Jorge Rangel 1e3ccc2430
Move model serialization ctor to model provider (#4143)
fixes: https://github.com/microsoft/typespec/issues/3871
2024-08-12 20:32:40 +00:00
Timothee Guerin 75e773cfa8
Add new way to define decorator implementation with `$decorators` export (#4139)
fix [#3719](https://github.com/microsoft/typespec/issues/3719)
2024-08-12 19:16:21 +00:00
Timothee Guerin 95ef4c358a
Make diagnostic code link to linter rule doc in IDE (#4141)
Saw that eslint extension was doing this. Part solution to
https://github.com/microsoft/typespec/issues/3043 which could also
provide an explicit `Open documentation Url` command

<img width="568" alt="image"
src="https://github.com/user-attachments/assets/c3a322d2-17c7-45d9-962c-028c1e9cc93c">

For now all the API that gives that is limited to linter as other
diagnostic cannot define a url. Due to this limited usage I left the API
internal. The goal would be that any diagnostic can define a
documentation url and connect to this.
2024-08-12 15:54:15 +00:00
Crystal YU c8d242b42d
adopt apiVersionEnum which will filter out unnessary apiversions (#4111)
Fix https://github.com/microsoft/typespec/issues/4110

TCGC will filter out the apiVersions for sdk emitters, and give out an
api-version Enum:

- filter out the api-version later than the default api-version
specified

- filter out preview api-version when the target api-version is stable
version.

This PR will use the tcgc apiVersion Enum type to do the api-version
filter.
2024-08-12 01:52:40 +00:00
Mario Guerra 7ce1c91d4c
REST tutorial revisions (#4104)
Revisions made based on test drive feedback from members of the PM team.
2024-08-10 00:52:08 +00:00
Timothee Guerin 355883995c
Fix numeric 0 stringify producing 0.0 (#4135) 2024-08-09 18:44:50 +00:00
Timothee Guerin 7186ce468d
Move label automation back to includeModifiedFiles now it support glob (#4048)
Policy bot just added this functionality which allows to use glob
pattern
https://github.com/GitOps-microsoft/GitOps.PullRequestIssueManagement/pull/255


EDIT: seems like this needs to be deployed, will try again in a little
bit
2024-08-09 18:12:01 +00:00
Kyle Zhang 0f3c031162
Test cases for OpentAPI 3 (#4121)
add some new cases for @useAuth/@server
openapi3: security- oauth2
openapi3: multiple servers

---------

Co-authored-by: Kyle Zhang <v-zhanh@microsoft.com>
2024-08-09 18:02:15 +00:00
m-nash 86d15b51c1
Add ctor support in named type symbols provider (#4137)
Fixes https://github.com/microsoft/typespec/issues/3804
2024-08-09 17:44:29 +00:00
Timothee Guerin aaa03cae23
Fix namespace with the same name conflicting in the tree navigation (#4136)
fix #4130
2024-08-09 17:00:57 +00:00
m-nash 04d5004546
Make CodeWriterDeclaration multi scope aware (#4131)
Fixes https://github.com/microsoft/typespec/issues/3853
2024-08-09 14:04:11 +00:00
m-nash bdb24b9629
Add model factory (#4092)
Fixes https://github.com/microsoft/typespec/issues/3709
2024-08-08 21:44:11 +00:00
Timothee Guerin 675e6d480d
Fix type argument tmlanguage (#4089)
Fix #3524
2024-08-08 21:42:27 +00:00
JoshLove-msft 630bdd4041
Fix sample build and rename ScmVisitor to ScmLibraryVisitor (#4125) 2024-08-08 19:10:29 +00:00
Jacob Roschen 5abf6dcee0
Fix OpenAPI3 union names when declared within a namespace (#4123)
fix #4122

---------

Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2024-08-08 17:51:08 +00:00