Skip to content

Commit 2dada8b

Browse files
committed
Update decision records to rst.
1 parent 5975f9b commit 2dada8b

File tree

9 files changed

+164
-30
lines changed

9 files changed

+164
-30
lines changed

docs/source/data/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
####
2+
Data
3+
####
4+
5+
6+
.. toctree:
7+
:maxdepth: 1
8+
:caption: Data
9+
10+
11+
Location Levels <./location-levels.rst>
12+
Time Series <./timeseries.rst>
Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
# API Versioning and Reporting
1+
############################
2+
API Versioning and Reporting
3+
############################
24

3-
## Summary
5+
Summary
6+
=======
47

58
API should provide a reason version and list/matrix of capabilities for a given instance of CDA
69

7-
## Opinions
10+
Opinions
11+
========
812

9-
### Opinion 1 Calendar versioning
13+
Opinion 1 Calendar versioning
14+
-----------------------------
1015

1116
@MikeNeilson
1217

@@ -22,23 +27,27 @@ With Calendar Versioning automation tools can just pick the current date when ap
2227
perhaps by merged into a particular branch.
2328

2429

25-
### Opinion 2 Users
30+
Opinion 2 Users
31+
---------------
2632

2733
Summary: It has been asked more than once that a version be provided
2834

2935
Having a version allows client to better respond to what's available instead of failing in obtuse ways.
3036

3137

32-
## Decision Status
38+
Decision Status
39+
===============
3340

3441
accepted
3542

3643
1. Provide endpoint to retrieve current API version.
3744
2. Likely include capability list or matrix.
3845

39-
## References
46+
References
47+
==========
4048

4149

42-
## Related decisions
50+
Related decisions
51+
=================
4352

4453
- data-versioning

docs/decisions/0002-data-versioning.md renamed to docs/source/decisions/0002-data-versioning.rst

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
# Data Types use Calendar Versioning
1+
##################################
2+
Data Types use Calendar Versioning
3+
##################################
24

3-
## Summary
5+
Summary
6+
=======
47

58
Instead of versioning the entire API, though the API has a version, we version the data types.
69

7-
## Opinions
10+
Opinions
11+
========
812

9-
### Opinion 1
13+
Opinion 1
14+
---------
1015

1116
Summary: Versioning the API itself, at the level of the path, will lead to too many paths to manage and be awkward for the clients
1217

@@ -23,9 +28,10 @@ The header, Accept, informs the API what format, or formats, we are willing to a
2328

2429

2530

26-
## Decision Status
31+
Decision Status
32+
---------------
2733

28-
proposed
34+
partial acceptance
2935

3036
Data, by content-types, are versioned. In the past there was some severe confusion on this part and it was treated as anything new was "version=2" in the content-type. To allow this design but reduce confusion going forward
3137

@@ -40,11 +46,13 @@ Version format is `YYYY-MM-DD`
4046

4147
[comment:] <> (Status: request for comments | proposed | accepted | rejected | deprecated | superseded)
4248

43-
## References
49+
References
50+
==========
4451

4552
I have several, I will dig them up likely next week
4653

47-
## Notes
54+
Notes
55+
=====
4856

4957
The initial idea in CDA was that the first version of any data type was, we'll just stick with JSON for each of message,
5058
"application/json;version=1" with "application/json" being the alias to the latest format version. However, this was not

docs/decisions/0003-searchability-and-catalogs.md renamed to docs/source/decisions/0003-searchability-and-catalogs.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
# Data should be readily searchable
1+
#################################
2+
Data should be readily searchable
3+
#################################
24

3-
## Summary
5+
Summary
6+
=======
47

58
It's not just a good idea, it's technically the law. While CDA currently expose a fair amount of information to search
69
it's never entirely clear.
710

8-
## Opinions
11+
Opinions
12+
========
913

10-
### Opinion 1
14+
Opinion 1
15+
---------
1116

1217
Summary: Each data time should support it's own /catalog end point.
1318

@@ -22,7 +27,8 @@ document which is for what or what changes for each.
2227

2328
To make 'catalog' operations clear, we should create /catalog for each data type that provide for discoverability of that data.
2429

25-
### Opinion 2
30+
Opinion 2
31+
---------
2632

2733
Summary: Each datatype under "catalog" should be a full path"
2834

@@ -33,10 +39,12 @@ path under `/catalog` instead of the current path parameter is a better approach
3339

3440
We would maintain the grouping, but each catalog can have it's appropriate search criteria.
3541

36-
## Decision Status
42+
Decision Status
43+
===============
3744

3845
proposed
3946

4047
[comment:] <> (Status: request for comments | proposed | accepted | rejected | deprecated | superseded)
4148

42-
## References
49+
References
50+
==========
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
########################
2+
CWMS Data Api Versioning
3+
########################
4+
5+
6+
Summary
7+
=======
8+
9+
Maintaining backwards compatibilty while improving future difficulty has proven sufficiently difficulty that change
10+
is required.
11+
12+
The API as a whole will retain the calendar based versioning for formal releases.
13+
Data *SHOULD* be versioned, if appropriate/needed, with otherwise backwards compatible changes to query parameters.
14+
Endpoints will be places under a new "api version" for backwards incompatible or confusing parameter changes.
15+
16+
e.g.
17+
18+
`https://host/cwms-data/locations`
19+
20+
can become
21+
22+
`https://host/cwms-data/v2/locations`
23+
24+
As additional endpoints require such a change they should be added to an existing increased version.
25+
26+
Example:
27+
28+
given above and a v1 `timeseries` and yet another `locations` improvements
29+
30+
.. code-block:
31+
32+
#new time series becomes
33+
cwms-data/v2/timeseries
34+
# the new location becomes
35+
cwms-data/v3/locations
36+
37+
.. NOTE:
38+
39+
Or is that confusing and we should just allows add a new endpoint to the highest endpoint version?
40+
41+
Opinions
42+
========
43+
44+
Opinion 1
45+
---------
46+
47+
Summary: Current scheme is not working
48+
49+
Author MikeNeilson, on behalf of others
50+
51+
We have failed to properly handle existing usages while attempting to improve the overall design of the api
52+
and have been breaking various downstream usages due to the confusion. Allowing the endpoints to be versioned allows
53+
an easier time keeping existing behavior while at allowing more drastic improvements in usages to happen.
54+
55+
Decision Status
56+
===============
57+
58+
[comment:] <> (Status: request for comments | proposed | accepted | rejected | deprecated | superseded)
59+
60+
References
61+
==========
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
1-
# Title
1+
#####
2+
Title
3+
#####
24

3-
## Summary
45

5-
## Opinions
6+
Summary
7+
=======
68

7-
### Opinion 1
9+
Opinions
10+
========
11+
12+
Opinion 1
13+
---------
814

915
Summary:
1016

1117
Author
1218

1319
descriptive text
1420

15-
## Decision Status
21+
Decision Status
22+
===============
1623

1724
[comment:] <> (Status: request for comments | proposed | accepted | rejected | deprecated | superseded)
1825

19-
## References
26+
References
27+
==========

docs/source/decisions/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
################
2+
Design Decisions
3+
################
4+
5+
6+
Overview
7+
========
8+
9+
10+
Below are agree upon decision choices regarding the usage of the API.
11+
Please note that certain decisions may be agreed upon before implementation.
12+
Whether or not a particular choice is implemented will be marked for each decision record.
13+
14+
Some decisions may also be a proposal and marked appropriately.
15+
16+
.. toctree::
17+
:maxdepth: 1
18+
:caption: Decisions
19+
20+
Api Versioning <./0001-api-versioning.rst>
21+
Data Versioning <./0002-data-versioning.rst>
22+
Catalogs and Search <./0003-searchability-and-catalogs.rst>
23+
Versioning <./0004-versioning.rst>

docs/source/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ Welcome to CWMS Data API documentation!
1515

1616
Overview <./introduction/overview.rst>
1717
Design <./introduction/design.rst>
18+
Decision Records <./decisions/index.rst>
1819
Endpoints <./endpoints/index.rst>
1920
Glossary <./glossary.rst>
2021
FAQ <./faq.rst>
21-
Client Libraries <./libraries.rst>
22+
Client Libraries <./libraries.rst>
23+
Data <./data/index.rst>

docs/source/libraries/java.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
####
2+
Java
3+
####

0 commit comments

Comments
 (0)