この章では、スキーマを作成および整理するためのベストプラクティスについて説明します。 これらのガイドラインに従うことで、 HERE platform の一般的な使用感を改善し、スキーマをプラットフォームにアップロードするとき、またはローカルにインストールするときのエラーを最小限に抑えることができます。
/// The file has a message that describes a geographical point.syntax="proto3";package com.here.example.v1;/**
* Represents a geographical point.
*/messagePoint{int32 lat =1;// The latitude of a pointint32 lon =2;// The longitude of a point}
# Protocol Documentation<aname="top"></a>## Table of Contents-[test_schema.proto](#test_schema.proto)-[Point](#com.here.example.v1.Point)-[Scalar Value Types](#scalar-value-types)<aname="test_schema.proto"></a><palign="right"><ahref="#top">Top</a></p>## test_schema.proto
The file has a message that describes a geographical point.
<aname="com.here.example.v1.Point"></a>### Point
Represents a geographical point.
| Field | Type | Label | Description ||-----|----|-----|-----------|| lat |[int32](#int32)|| The latitude of a point || lon |[int32](#int32)|| The longitude of a point |## Scalar Value Types| .proto Type | Notes | C++ Type | Java Type | Python Type ||-----------|-----|--------|---------|-----------||<aname="double"/> double || double | double | float ||<aname="float"/> float || float | float | float ||<aname="int32"/> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int ||<aname="int64"/> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long ||<aname="uint32"/> uint32 | Uses variable-length encoding. | uint32 | int | int/long ||<aname="uint64"/> uint64 | Uses variable-length encoding. | uint64 | long | int/long ||<aname="sint32"/> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int ||<aname="sint64"/> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long ||<aname="fixed32"/> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int ||<aname="fixed64"/> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long ||<aname="sfixed32"/> sfixed32 | Always four bytes. | int32 | int | int ||<aname="sfixed64"/> sfixed64 | Always eight bytes. | int64 | long | int/long ||<aname="bool"/> bool || bool | boolean | boolean ||<aname="string"/> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode ||<aname="bytes"/> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |
description.md サンプルスキーマプロジェクトの既定のファイルを .md 、上記で生成したファイルで置き換え、スキーマで公開できるようになりました。 HTML に変換すると、レンダリングされたスキーマドキュメントは次のようになります。
スキーマドキュメント
パッケージの命名
スキーマプロジェクトの生成段階で、スキーマのグループ ID 、アーティファクト ID、およびパッケージ名を定義するように要求されます。 パッケージ名を指定しない場合は、代わりにグループ ID が使用されます。
HERE リソースネームをプラットフォームにアップロードすると、グループ ID とアーティファクト ID を使用してスキーマの HERE リソースネーム (スキーマ)が生成されます。 たとえば 、 HMC Building FootPrints スキーマの HERE リソースネーム はです hrn:here:schema:::com.here.schema.rib:building-footprints_v2:2.13.0。