Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json API v2 initial documentation #830

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
dc8dc08
creating rescue
jarekr-da Dec 16, 2024
4233a79
creating rescue
jarekr-da Dec 16, 2024
fb7db7c
after rescue
jarekr-da Dec 16, 2024
0d2da0e
extended underline
jarekr-da Dec 16, 2024
f46cdc0
fixed CreateAndExercise
jarekr-da Dec 16, 2024
d914cc1
Update docs/3.1/docs/json-api/asyncapi.rst
jarekr-da Dec 17, 2024
579a7b2
Update docs/3.1/docs/json-api/asyncapi.rst
jarekr-da Dec 17, 2024
e4e7db9
Update docs/3.1/docs/json-api/asyncapi.rst
jarekr-da Dec 17, 2024
8c65059
Update docs/3.1/docs/json-api/asyncapi.rst
jarekr-da Dec 17, 2024
c30b215
Update docs/3.1/docs/json-api/v1/index.rst
jarekr-da Dec 17, 2024
405826c
Update docs/3.1/docs/json-api/v1/index.rst
jarekr-da Dec 17, 2024
5092f37
Update docs/3.1/docs/json-api/v1/index.rst
jarekr-da Dec 17, 2024
5881582
Update docs/3.1/docs/json-api/v1/index.rst
jarekr-da Dec 17, 2024
57a398f
Update docs/3.1/docs/json-api/v1/index.rst
jarekr-da Dec 17, 2024
665a726
spelling + fixes
jarekr-da Dec 17, 2024
5ec5c1a
spelling + fixes
jarekr-da Dec 18, 2024
f0c2cc6
spelling + fixes
jarekr-da Dec 20, 2024
21ecde9
working pdf
jarekr-da Dec 20, 2024
1e75a0b
working pdf
jarekr-da Dec 20, 2024
a2a9432
Update docs/3.1/docs/json-api/asyncapi.rst
jarekr-da Dec 20, 2024
2a989f1
Update docs/3.1/docs/json-api/asyncapi.rst
jarekr-da Dec 20, 2024
26de930
Update docs/3.1/docs/json-api/index.rst
jarekr-da Dec 20, 2024
53cc1fc
Update docs/3.1/docs/json-api/index.rst
jarekr-da Dec 20, 2024
a4e8460
Update docs/3.1/docs/json-api/index.rst
jarekr-da Dec 20, 2024
b5c7197
Update docs/3.1/docs/json-api/index.rst
jarekr-da Dec 20, 2024
5fb07c4
Update docs/3.1/docs/json-api/openapi.rst
jarekr-da Dec 20, 2024
8210f32
Update docs/3.1/docs/json-api/index.rst
jarekr-da Dec 20, 2024
7ba8552
working pdf
jarekr-da Jan 3, 2025
eb40ebc
added package names
jarekr-da Jan 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/3.1/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,15 @@ subtrees:
entries:
- file: json-api/index
title: "HTTP JSON API Service"
- file: json-api/openapi
title: "HTTP JSON API Openapi specification"
- file: json-api/asyncapi
title: "HTTP JSON API Asyncapi specification"
- file: json-api/lf-value-specification
title: "Legacy HTTP JSON API Service (V1)"
- file: json-api/v1/index
title: "Daml-LF JSON Encoding"
- file: json-api/search-query-language
- file: json-api/v1/search-query-language
title: "Query Language"
- file: app-dev/bindings-ts/index
title: "Use JavaScript Client Libraries with Daml"
Expand Down
2 changes: 2 additions & 0 deletions docs/3.1/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -x
set -eou pipefail

DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
Expand Down Expand Up @@ -98,3 +99,4 @@ rm -r $BUILD_DIR/sphinx-target/html/.buildinfo $BUILD_DIR/sphinx-target/html/.do
)

tar cfz $TARGET_DIR/html-$prefix.tar.gz -C $BUILD_DIR/sphinx-target html
echo "finished"
16 changes: 16 additions & 0 deletions docs/3.1/docs/json-api/asyncapi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

JSON API V2 Asyncapi definition
###############################

This section contains a copy of the asyncapi/openapi specification.

If you start Canton with the HTTP API enabled, this specification is available under http://<host>:<port>/docs/asyncapi

The sources below can be copied to `Editor swagger IO <https://editor-next.swagger.io>`_ . The editor displays a preview of the specification and generates example inputs and outputs.

The specification covers streaming (websockets) endpoints - for regular endpoints (HTTP) please see :doc:`openapi`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these work yet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Websockets work normally.


Properties of type: `{}` (any JSON) are DAML types as defined in the Daml template and formatted according to :doc:`lf-value-specification`.

.. literalinclude:: openapi/asyncapi.yaml
:language: yaml
Loading