@@ -39,19 +39,23 @@ service DocumentedService {
3939
4040/// This operation does not support any of the service's auth types.
4141@auth ([])
42+ @http (method : " POST" , uri : " /UnauthenticatedOperation" )
4243operation UnauthenticatedOperation {}
4344
4445/// This operation supports all of the service's auth types, but optionally.
4546@optionalAuth
47+ @http (method : " POST" , uri : " /OptionalAuthOperation" )
4648operation OptionalAuthOperation {}
4749
4850/// This operation supports a limited set of the service's auth.
4951@auth ([httpBasicAuth , httpApiKeyAuth ])
52+ @http (method : " POST" , uri : " /LimitedAuthOperation" )
5053operation LimitedAuthOperation {}
5154
5255/// This operation supports a limited set of the service's auth, optionally.
5356@optionalAuth
5457@auth ([httpBasicAuth , httpDigestAuth ])
58+ @http (method : " POST" , uri : " /LimitedOptionalAuthOperation" )
5559operation LimitedOptionalAuthOperation {}
5660
5761@examples (
@@ -81,6 +85,7 @@ operation LimitedOptionalAuthOperation {}
8185@requestCompression (
8286 encodings : [" gzip" ]
8387)
88+ @http (method : " POST" , uri : " /DocumentedOperation" )
8489operation DocumentedOperation {
8590 input := {
8691 /// This is an idempotency token, which will inherently mark this operation
@@ -347,9 +352,11 @@ boolean DocumentationArchived
347352
348353/// Put operations create a resource with a user-specified identifier.
349354@idempotent
355+ @http (method : " PUT" , uri : " /DocumentationResource/{id}" )
350356operation PutDocumentation {
351357 input := for DocumentationResource {
352358 @required
359+ @httpLabel
353360 $id
354361
355362 @required
@@ -358,6 +365,7 @@ operation PutDocumentation {
358365}
359366
360367/// Create operations instead have the service create the identifier.
368+ @http (method : " POST" , uri : " /DocumentationResource" )
361369operation CreateDocumentation {
362370 input := for DocumentationResource {
363371 @required
@@ -367,9 +375,11 @@ operation CreateDocumentation {
367375
368376/// Gets the contents of a documentation resource.
369377@readonly
378+ @http (method : " GET" , uri : " /DocumentationResource/{id}" )
370379operation GetDocumentation {
371380 input := for DocumentationResource {
372381 @required
382+ @httpLabel
373383 $id
374384 }
375385
@@ -388,9 +398,11 @@ operation GetDocumentation {
388398/// Does an update on the documentation resource. These can often also be the put
389399/// lifecycle operation.
390400@idempotent
401+ @http (method : " PUT" , uri : " /DocumentationResource" )
391402operation UpdateDocumentation {
392403 input := for DocumentationResource {
393404 @required
405+ @httpQuery (" id" )
394406 $id
395407
396408 @required
@@ -400,9 +412,11 @@ operation UpdateDocumentation {
400412
401413/// Deletes documentation.
402414@idempotent
415+ @http (method : " DELETE" , uri : " /DocumentationResource/{id}" )
403416operation DeleteDocumentation {
404417 input := for DocumentationResource {
405418 @required
419+ @httpLabel
406420 $id
407421 }
408422}
@@ -411,28 +425,36 @@ operation DeleteDocumentation {
411425/// We need both instance operations and collection operations that aren't lifecycle
412426/// operations to make sure both cases are being documented.
413427@idempotent
428+ @http (method : " PUT" , uri : " /DocumentationResource/{id}/archive" )
414429operation ArchiveDocumentation {
415430 input := for DocumentationResource {
416431 @required
432+ @httpLabel
417433 $id
418434 }
419435}
420436
421437/// Deletes all documentation that's been archived. This is a collection operation that
422438/// isn't part of a lifecycle operation, which is again needed to make sure everything
423439/// is being documented as expected.
440+ @http (method : " DELETE" , uri : " /DocumentationResource?delete-archived" )
441+ @idempotent
424442operation DeleteArchivedDocumentation {}
425443
426444/// Lists the avialable documentation resources.
427445@readonly
446+ @http (method : " GET" , uri : " /DocumentationResource" )
428447@paginated (inputToken : " paginationToken" , outputToken : " paginationToken" , items : " documentation" , pageSize : " pageSize" )
429448operation ListDocumentation {
430449 input := {
431- // Whether to list documentation that has been archived.
450+ /// Whether to list documentation that has been archived.
451+ @httpQuery (" showArchived" )
432452 showArchived : Boolean = false
433453
454+ @httpHeader (" x-example-pagination-token" )
434455 paginationToken : String
435456
457+ @httpHeader (" x-example-page-size" )
436458 pageSize : Integer
437459 }
438460
@@ -476,12 +498,15 @@ string DocumentationArtifactId
476498blob DocumentationArtifactData
477499
478500@idempotent
501+ @http (method : " PUT" , uri : " /DocumentationResource/{id}/artifact/{artifactId}" )
479502operation PutDocumentationArtifact {
480503 input := for DocumentationArtifact {
481504 @required
505+ @httpLabel
482506 $id
483507
484508 @required
509+ @httpLabel
485510 $artifactId
486511
487512 @required
@@ -490,12 +515,15 @@ operation PutDocumentationArtifact {
490515}
491516
492517@readonly
518+ @http (method : " GET" , uri : " /DocumentationResource/{id}/artifact/{artifactId}" )
493519operation GetDocumentationArtifact {
494520 input := for DocumentationArtifact {
495521 @required
522+ @httpLabel
496523 $id
497524
498525 @required
526+ @httpLabel
499527 $artifactId
500528 }
501529
@@ -512,12 +540,15 @@ operation GetDocumentationArtifact {
512540}
513541
514542@idempotent
543+ @http (method : " DELETE" , uri : " /DocumentationResource/{id}/artifact/{artifactId}" )
515544operation DeleteDocumentationArtifact {
516545 input := for DocumentationArtifact {
517546 @required
547+ @httpLabel
518548 $id
519549
520550 @required
551+ @httpLabel
521552 $artifactId
522553 }
523554}
0 commit comments