Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
04663a3
init files from conversion
kashifkhan Jul 9, 2025
99cd0c1
initial checklist fixes
kashifkhan Jul 9, 2025
b59baaf
fix service decorator info
kashifkhan Jul 9, 2025
00c8a06
enum to union in models
kashifkhan Jul 9, 2025
ea0d5e2
newly compiled files
kashifkhan Jul 9, 2025
55bba96
add linter
kashifkhan Jul 9, 2025
830f1cd
initial warnings fixes
kashifkhan Jul 9, 2025
e1d059e
updates
kashifkhan Jul 9, 2025
9e7fc82
fix
kashifkhan Jul 9, 2025
3c95c61
suppress warnings
kashifkhan Jul 9, 2025
3b43716
suppress for std ops
kashifkhan Jul 9, 2025
a3186c8
emitter updates
kashifkhan Jul 9, 2025
cc62ebf
rename interface name to match output
kashifkhan Jul 14, 2025
f4c3d40
adjust ns
kashifkhan Jul 14, 2025
2dfffcf
mod output dir location
kashifkhan Jul 14, 2025
3db27c1
add tokencredential
kashifkhan Jul 15, 2025
de84be8
ignore mqtt for spelling
kashifkhan Jul 15, 2025
e397e7b
prettier fixes
kashifkhan Jul 15, 2025
8ff7c58
match the orig doc
kashifkhan Jul 21, 2025
57bbcb5
client customizations
kashifkhan Jul 21, 2025
ac23443
update method name
kashifkhan Jul 21, 2025
0843f95
update version info
kashifkhan Jul 21, 2025
5e0246a
rename operation to match old
kashifkhan Jul 21, 2025
7309f71
fix package pprint name
kashifkhan Jul 22, 2025
5ed16b7
align error codes and success
kashifkhan Jul 22, 2025
715aeaf
fix kwarg names
kashifkhan Jul 22, 2025
13e6ac8
rename operation to match
kashifkhan Jul 22, 2025
e48adbe
update ns name
kashifkhan Jul 22, 2025
7587f30
mark model as pagedResult
kashifkhan Jul 22, 2025
9593d5d
removed unused model
kashifkhan Jul 22, 2025
dc166ec
removed openapi import
kashifkhan Jul 22, 2025
fd8e047
leave query as is
kashifkhan Jul 22, 2025
47b8554
fix listconn op to be a list, fix model item
kashifkhan Jul 22, 2025
dad62e9
clean up tsp config
kashifkhan Jul 22, 2025
44e52ba
fix typo
kashifkhan Jul 22, 2025
84c08af
info for other languages, commented out for now
kashifkhan Jul 22, 2025
be1cb27
add suppressions for backwards comp
kashifkhan Jul 22, 2025
8d6250c
removed unused imports
kashifkhan Jul 22, 2025
5bd8052
remove interfaces, remove client location
kashifkhan Jul 22, 2025
8467a12
add connection_id to groupmember
kashifkhan Jul 31, 2025
9b674da
fix missing json ref
kashifkhan Aug 14, 2025
23c15f3
add new json file
kashifkhan Aug 15, 2025
e9422e5
changes to tspconfig
kashifkhan Aug 15, 2025
651a6e0
changes for other langs
kashifkhan Aug 15, 2025
9b7c4d2
add suppressions
kashifkhan Aug 15, 2025
06a8af0
rename
kashifkhan Aug 15, 2025
77fb0ee
add csharp pckage name
kashifkhan Aug 15, 2025
e3eb8f5
tsp config changes
kashifkhan Aug 15, 2025
13f1672
add reference
kashifkhan Aug 15, 2025
1f255b2
add ts package dir
kashifkhan Aug 15, 2025
4ae8566
remove additional files
kashifkhan Aug 15, 2025
f6c88af
reset readme file
kashifkhan Aug 15, 2025
aa8419e
new namespace
kashifkhan Aug 15, 2025
1e896cb
remove old swagger
kashifkhan Aug 15, 2025
286c1fe
add new swagger and examples
kashifkhan Aug 15, 2025
235488a
point readme to new swagger
kashifkhan Aug 15, 2025
3efd0fb
fix readme
kashifkhan Aug 15, 2025
635aa4c
some minor changes
kashifkhan Aug 18, 2025
6f13575
align response codes with openapi
kashifkhan Aug 18, 2025
ba04a50
align response codes
kashifkhan Aug 18, 2025
adba284
update to compliant names
kashifkhan Aug 18, 2025
11e6f1c
try to fix model validation byte error
kashifkhan Aug 18, 2025
da75b0d
fix byte validation error
kashifkhan Aug 18, 2025
4f59e9a
fix deprecation error
kashifkhan Aug 18, 2025
6dd5515
fix validation
kashifkhan Aug 18, 2025
78ae894
keep the old swagger name
kashifkhan Aug 19, 2025
d915ee7
readme update for swagger rename
kashifkhan Aug 19, 2025
45867e0
small fixes
kashifkhan Aug 19, 2025
ca5c664
formatting
kashifkhan Aug 19, 2025
eb73a9b
fix js tspconfig
kashifkhan Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updates
  • Loading branch information
kashifkhan committed Jul 22, 2025
commit e1d059e8e71e36873836e3a9121539eb936c1a6c
173 changes: 91 additions & 82 deletions specification/webpubsub/Azure.Messaging.WebPubSub/models.tsp
Original file line number Diff line number Diff line change
@@ -1,38 +1,60 @@
import "@typespec/rest";
import "@typespec/http";
import "@typespec/rest";
import "@azure-tools/typespec-azure-core";

using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.Rest;
using Azure.Core;

namespace Azure.Messaging.WebPubSub;

/** The type of Web PubSub client. */
union WebPubSubClientType {
string,
/**
* Details about the client.
*/
model ClientDetail {
/** User Id */
userId?: string;

/** Default Web PubSub client type */
Default: "Default",
/** Roles that the connection with the user id has */
roles?: string[];
}

/** MQTT Web PubSub client type */
MQTT: "MQTT",
/**
* The response object containing the client access token
*/
model ClientTokenResponse {
/** Access token for the client to connect Azure Web PubSub service */
token?: string;
}

/** Web PubSub permission types. */
union WebPubSubPermission {
string,
/**
* Request object to add connections to groups
*/
model AddToGroupsRequest {
/** Target groups */
groups?: string[];

/** Permission to send messages to a group */
sendToGroup: "sendToGroup",
/** Following OData filter syntax to filter out the subscribers receiving the messages */
filter?: string;
}

/** Permission to join or leave a group */
joinLeaveGroup: "joinLeaveGroup",
/**
* Request object to remove connections from groups
*/
model RemoveFromGroupsRequest {
/** Target groups */
groups?: string[];

/** Following OData filter syntax to filter out the subscribers receiving the messages */
filter?: string;
}

/**
* Content type for upload
*/
union ContentType {
string,

/**
* Content Type 'application/json'
*/
Expand All @@ -50,107 +72,94 @@ union ContentType {
}

/**
* The request object containing targets groups and a connection filter
* Content type for HTTP headers in message operations (closed union for HTTP compliance)
*/
model AddToGroupsRequest {
// @azure-tools/typespec-azure-core/no-closed-literal-union - Intentionally closed for HTTP Content-Type header compliance
union MessageContentType {
/**
* A list of groups which target connections will be added into
* Content Type 'application/json'
*/
groups?: string[];
"application/json",

/**
* An OData filter which target connections satisfy
* Content Type 'application/octet-stream'
*/
filter?: string;
"application/octet-stream",

/**
* Content Type 'text/plain'
*/
"text/plain",
}

/**
* The error object.
* Content type for response headers (closed union for HTTP compliance)
*/
@error
model ErrorDetail {
// @azure-tools/typespec-azure-core/no-closed-literal-union - Intentionally closed for HTTP Content-Type header compliance
union ResponseContentType {
/**
* One of a server-defined set of error codes.
* Content Type 'application/json'
*/
code?: string;
"application/json",

/**
* A human-readable representation of the error.
* Content Type 'text/json'
*/
message?: string;
"text/json",
}

/**
* The target of the error.
*/
target?: string;
/**
* Group member
*/
model GroupMember {
/** User Id */
userId?: string;
}

/**
* An array of details about specific errors that led to this reported error.
*/
details?: ErrorDetail[];
/**
* Paged response for group members
*/
model GroupMemberPagedValues {
/** The group members */
value?: GroupMember[];

/**
* Detailed error
*/
inner?: InnerError;
/** The link to the next page of results */
nextLink?: string;
}

/**
* Detailed error
* Error detail information.
*/
model InnerError {
/**
* A more specific error code than was provided by the containing error.
*/
/** Error code. */
code?: string;

/**
* Detailed error
*/
inner?: InnerError;
/** Error message. */
message?: string;
}

/**
* The response object containing the token for the client
* Web PubSub permission
*/
model ClientTokenResponse {
/**
* The token value for the WebSocket client to connect to the service
*/
token?: string;
}
union WebPubSubPermission {
string,

/**
* The request object containing targets groups and a connection filter
*/
model RemoveFromGroupsRequest {
/**
* A list of groups which target connections will be removed from
*/
groups?: string[];
/** The permission to send messages to groups. */
SendToGroup: "sendToGroup",

/**
* An OData filter which target connections satisfy
*/
filter?: string;
/** The permission to join/leave groups. */
JoinLeaveGroup: "joinLeaveGroup",
}

/**
* Represents a page of elements as a LIST REST API result.
* Web PubSub client type
*/
model GroupMemberPagedValues is Azure.Core.Page<GroupMember>;
union WebPubSubClientType {
string,

/**
* Represents a member in a group.
*/
model GroupMember {
/**
* A unique identifier of a connection.
*/
connectionId: string;
/** Default value. */
Default: "Default",

/**
* The user ID of the connection. A user can have multiple connections.
*/
userId?: string;
/** MQTT client. */
MQTT: "mqtt",
}
20 changes: 10 additions & 10 deletions specification/webpubsub/Azure.Messaging.WebPubSub/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ interface WebPubSubOperationGroup {
clientType?: WebPubSubClientType = WebPubSubClientType.Default;
},
ClientTokenResponse & {
@header
contentType: "application/json" | "text/json";
@header("content-type")
contentType: ResponseContentType;
}
>;

Expand Down Expand Up @@ -199,8 +199,8 @@ interface WebPubSubOperationGroup {
/**
* Upload file type
*/
@header
`content-type`: ContentType;
@header("content-type")
contentType: MessageContentType;

/**
* The payload body.
Expand Down Expand Up @@ -306,8 +306,8 @@ interface WebPubSubOperationGroup {
/**
* Upload file type
*/
@header
`content-type`: ContentType;
@header("content-type")
contentType: MessageContentType;

/**
* The payload body.
Expand Down Expand Up @@ -464,8 +464,8 @@ interface WebPubSubOperationGroup {
/**
* Upload file type
*/
@header
`content-type`: ContentType;
@header("content-type")
contentType: MessageContentType;

/**
* The payload body.
Expand Down Expand Up @@ -830,8 +830,8 @@ interface WebPubSubOperationGroup {
/**
* Upload file type
*/
@header
`content-type`: ContentType;
@header("content-type")
contentType: MessageContentType;

/**
* The payload body.
Expand Down