-
Notifications
You must be signed in to change notification settings - Fork 15
Add GetQueue specification #6
base: master
Are you sure you want to change the base?
Conversation
* @member {GetQueueResponseContentQueueDescriptionCountDetails} | ||
* [countDetails] TODO: Add description | ||
*/ | ||
countDetails?: GetQueueResponseContentQueueDescriptionCountDetails; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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.
@@ -23,6 +23,7 @@ | |||
], | |||
"include": [ | |||
"./lib/**/*.ts", | |||
"./examples/**/*.ts" | |||
"./examples/**/*.ts", | |||
"./test/**/*.ts" |
There was a problem hiding this comment.
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
@@ -8,7 +8,6 @@ | |||
], | |||
"typedef": [ | |||
true, | |||
"call-signature", |
There was a problem hiding this comment.
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}/": { |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Queues_Create
} | ||
} | ||
}, | ||
"content": { |
There was a problem hiding this comment.
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": { |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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": { |
There was a problem hiding this comment.
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.", |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
Add management plane swagger specification that defines the GetQueue operation.
I also added tests that verify/document the behavior of the operation.