Skip to content

Croupier C++ SDK Conventions ​

Naming Conventions ​

Function IDs use [namespace.]resource.operation:

cpp
"player.get"
"player.ban"
"inventory.item.add"

Registration Conventions ​

  • Complete registration before Connect()
  • Function IDs are unique within the same service instance
  • Descriptors must include at least id and version

Descriptor Recommendations ​

Fill in the basic descriptive fields:

  • summary
  • description
  • tags
  • input_schema (C++ member name; corresponding contract key inputSchema)
  • output_schema (C++ member name; corresponding contract key outputSchema)

Fill in the business and governance fields:

  • resource
  • operation
  • capability
  • risk
  • execution (ExecutionSemantics: timeout/retry/concurrency semantics)
  • approvalRequired / approvalPolicyKey (ApprovalPolicy)
  • enabled
  • permission

Semantic constraints:

  • operation is the business operation key, e.g. ban, grant, send.
  • The SDK descriptor does not provide page schemas, component trees, page mappings, menus, category display names, page titles, button labels, or page placement.
  • Dynamic categories, page titles, button labels, and page placement are decided only in PageSpec / Page Studio. They are not written into the SDK descriptor, nor into frontend static locale files.
  • capability only allows controlled resource semantics: collection_query/item_query/create/update/delete/action/task/report. It is not a page type or a button placement.
  • The default PageProposal is generated by the Server from FunctionContract, JSON Schema, CapabilitySemantics, and diagnostics; the SDK does not provide columns, mappings, menus, or UI.

For the full contract, see OpenAPI / SDK Descriptor v2.

Practical Advice ​

  • Function parameters should reference business objects by ID instead of passing bulky objects
  • Explicitly set risk for high-risk operations