Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Conversation

@ghost
Copy link

@ghost ghost commented Oct 18, 2018

Add management plane swagger specification that defines the GetQueue operation.
I also added tests that verify/document the behavior of the operation.

@ghost ghost self-assigned this Oct 18, 2018
@ghost ghost requested a review from amarzavery October 18, 2018 20:42
@ghost ghost closed this Oct 18, 2018
@ghost ghost reopened this Oct 18, 2018
* @member {GetQueueResponseContentQueueDescriptionCountDetails}
* [countDetails] TODO: Add description
*/
countDetails?: GetQueueResponseContentQueueDescriptionCountDetails;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to shorten the type name to QueueDescriptionCountDetails?

@@ -0,0 +1,67 @@
PUT https://daschulttest1.servicebus.windows.net/testQueuePath?api-version=2017-04 HTTP/1.1
Authorization: SharedAccessSignature sr=https%3A%2F%2Fdaschulttest1.servicebus.windows.net%2FtestQueuePath%2F&sig=bCEWzr1DOgXB5XCeNjWJU2zfhH1%2F%2Fca56gVNovbPPUY%3D&se=1539812750&skn=RootManageSharedAccessKey
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the real SharedAccessKey? If so please delete this key from the portal, remove it from here and make sure to either not have this header or fill it with dummy value.

@@ -0,0 +1,241 @@
import { SasTokenProvider, TokenInfo } from "@azure/amqp-common";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you suffix the test files with spec.ts. I learnt about this new convention and like it.

"./lib/**/*.ts",
"./examples/**/*.ts"
"./examples/**/*.ts",
"./test/**/*.ts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make sure to add dist/test and typings/test to .npmignore

],
"typedef": [
true,
"call-signature",
Copy link
Collaborator

Choose a reason for hiding this comment

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

any reason to remove these from tsconfig?

]
},
"paths": {
"/{queuePath}/": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to have forward slash in the end?

"tags": [
"Queues"
],
"operationId": "Queue_Get",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make sure that the entry in the tags array matches the initial part in the operationId. The operationId should also be "Queues_Get". We recommend having plural nouns for the operation group.

"200": {
"description": "OK -- Get Queue operation completed successfully.",
"schema": {
"$ref": "#/definitions/GetQueueResponse"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's name this Queue. This will ensure that the generated interface is called Queue.

"tags": [
"Queues"
],
"operationId": "Queue_Create",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Queues_Create

}
}
},
"content": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a top level model in "definitions" and content should have a reference to that model

"attribute": true
}
},
"QueueDescription": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a top level model in the definitions object.

"type": "boolean"
},
"CountDetails": {
"description": "TODO: Add description",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a top level model in the definitions object.

"type": "object",
"properties": {
"content": {
"description": "TODO: Add description",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a top level model in the definitions object.

"namespace": "http://www.w3.org/2005/Atom"
}
},
"CreateQueueBody": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

CreateQueueParameters would be a better name

}
},
"CreateQueueBody": {
"description": "The response from a CreateQueue operation.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Parameters that can be provided while creating a queue.

"Status": {
"description": "TODO: Add description",
"type": "string",
"default": "Active"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't this be readonly? If not "Active" then what are the other possible values that one can provide? Can someone create an "InActive" queue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants