Documentation

com.google.api.documentation.Documentation
See theDocumentation companion object
final case class Documentation(summary: String, pages: Seq[Page], rules: Seq[DocumentationRule], documentationRootUrl: String, serviceRootUrl: String, overview: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Documentation]

Documentation provides the information for describing a service.

Example: <pre><code>documentation: summary: > The Google Calendar API gives access to most calendar features. pages:

  • name: Overview content: &#40;== include google/foo/overview.md ==&#41;

  • name: Tutorial content: &#40;== include google/foo/tutorial.md ==&#41; subpages;

    • name: Java content: &#40;== include google/foo/tutorial_java.md ==&#41; rules:

  • selector: google.calendar.Calendar.Get description: > ...

  • selector: google.calendar.Calendar.Put description: > ... </code></pre> Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded.

Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided.

A number of constructs specific to the API platform are supported in documentation text.

In order to reference a proto element, the following notation can be used: <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre> To override the display text used for the link, this can be used: <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre> Text can be excluded from doc using the following notation: <pre><code>&#40;-- internal comment --&#41;</code></pre>

A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The include directive includes a markdown file from an external source: <pre><code>&#40;== include path/to/file ==&#41;</code></pre> The resource_for directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre> The directive suppress_warning does not directly affect documentation and is documented together with service config validation.

Value parameters

documentationRootUrl

The URL to the root of documentation.

overview

Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: &#40;== include overview.md ==&#41; </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:

  • name: Overview content: &#40;== include overview.md ==&#41; </code></pre> Note: you cannot specify both overview field and pages field.

pages

The top level pages for the documentation set.

rules

A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow "last one wins" order.

serviceRootUrl

Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.

summary

A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field description.

Attributes

Companion
object
Source
Documentation.scala
Graph
Supertypes
trait Updatable[Documentation]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Attributes

Source
Documentation.scala
def addPages(`__vs`: Page*): Documentation

Attributes

Source
Documentation.scala

Attributes

Source
Documentation.scala

Attributes

Source
Documentation.scala
def getField(`__field`: FieldDescriptor): PValue

Attributes

Source
Documentation.scala
def getFieldByNumber(`__fieldNumber`: Int): Any

Attributes

Source
Documentation.scala
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
Source
Documentation.scala

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

Source
Documentation.scala

Attributes

Source
Documentation.scala

Attributes

Source
Documentation.scala

Attributes

Source
Documentation.scala
def withUnknownFields(`__v`: UnknownFieldSet): Documentation

Attributes

Source
Documentation.scala
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Source
Documentation.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
def update(ms: Lens[Documentation, Documentation] => () => Documentation*): A

Attributes

Inherited from:
Updatable
Source
Lenses.scala
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala