@lunch-money/developer-docs 2.11.0-preview.16-no-bh → 2.11.0-preview.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/beta-introduction.md +1 -0
- package/package.json +1 -1
- package/v2/docs/AGENTS.md +48 -0
- package/v2/docs/version-history.md +2 -0
- package/v2/spec/AGENTS.md +75 -0
- package/v2/spec/lunch-money-api-v2.yaml +3973 -3777
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
- Beta versions of new [v2 API](/v2/docs) endpoints:
|
|
4
4
|
- [/crypto/manual](v2/docs#tag/crypto-manual)
|
|
5
5
|
- [/crypto/synced](v2/docs#tag/crypto-synced)
|
|
6
|
+
- [/balance/history](v2/docs#tag/balance-history)
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
Feedback is welcome. [Email dev-support@lunchmoney.app](mailto:dev-support@lunchmoney.app) or join us in the [developers channel](https://discord.com/channels/842337014556262411/1134594318414389258) on the [Lunch Money Discord](https://lunchmoney.app/discord).
|
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# V2 documentation instructions
|
|
2
|
+
|
|
3
|
+
Follow these rules when editing files under `v2/docs` or documenting changes to `v2/spec/lunch-money-api-v2.yaml`.
|
|
4
|
+
|
|
5
|
+
## Version history
|
|
6
|
+
|
|
7
|
+
For every consumer-visible spec change, update `v2/docs/version-history.md` under the version being prepared.
|
|
8
|
+
|
|
9
|
+
Keep entries brief and high level. The version history records what changed; the OpenAPI endpoint documentation describes how to use it.
|
|
10
|
+
|
|
11
|
+
Include:
|
|
12
|
+
|
|
13
|
+
- New, renamed, deprecated, or removed endpoints
|
|
14
|
+
- Changes to path or query parameters
|
|
15
|
+
- Changes to request-body properties
|
|
16
|
+
- Changes to response-body properties or shapes
|
|
17
|
+
- Changed status codes, accepted values, defaults, limits, or validation behavior
|
|
18
|
+
- Breaking changes
|
|
19
|
+
|
|
20
|
+
Do not include:
|
|
21
|
+
|
|
22
|
+
- Product or implementation rationale
|
|
23
|
+
- Internal implementation details
|
|
24
|
+
- Detailed usage instructions or examples
|
|
25
|
+
- Full schema descriptions
|
|
26
|
+
- Testing, rollout, or cross-repository implementation details
|
|
27
|
+
- Editorial changes that do not alter the documented API contract
|
|
28
|
+
|
|
29
|
+
### Style
|
|
30
|
+
|
|
31
|
+
- Name endpoints using the HTTP method and path, such as `GET /balance_history`.
|
|
32
|
+
- Format endpoints, parameter names, property names, schema names, and literal values with backticks.
|
|
33
|
+
- Start bullets with a present-tense verb such as `Add`, `Change`, `Remove`, `Rename`, or `Deprecate`.
|
|
34
|
+
- Prefer one concise bullet for each logical change.
|
|
35
|
+
- Use nested bullets only to list endpoints or closely related property changes.
|
|
36
|
+
- Do not explain why the change was made or provide instructions for adapting to it.
|
|
37
|
+
- Keep unreleased versions marked `TBD`; do not assign a release date without confirmation.
|
|
38
|
+
- Clearly label breaking changes.
|
|
39
|
+
|
|
40
|
+
## Other documentation
|
|
41
|
+
|
|
42
|
+
- Do not routinely update `v2/docs/migration-guide.md` or `v2/docs/intro-to-v2.md` for individual spec changes.
|
|
43
|
+
- Determine whether a spec change makes an existing guide factually incorrect, including guides in the shared `docs` directory.
|
|
44
|
+
- Correct an existing guide when it would otherwise contradict the spec.
|
|
45
|
+
- Consider broader documentation only for a reusable cross-endpoint concept that cannot be documented adequately on the affected endpoints.
|
|
46
|
+
- If broader documentation might be useful but is not required for correctness, identify the candidate page and ask the user before expanding it or adding a page.
|
|
47
|
+
- Prefer endpoint descriptions over general guides for endpoint-specific behavior.
|
|
48
|
+
- Do not add detail to the migration guide merely because V2 differs from V1.
|
|
@@ -17,6 +17,8 @@ The Lunch Money API spec uses a modified version of SEMVER for its versioning me
|
|
|
17
17
|
- Add `PUT /balance_history/deleted/{account_id}/details`
|
|
18
18
|
- Remove `rollover_pool` from the category object returned in the summary response. It is in the main summary response.
|
|
19
19
|
- It is now possible to set an external_id on any transaction, including those that belong to a Plaid account.
|
|
20
|
+
- Manual-account and manually managed crypto create requests now accept `null` for their optional display, institution, and subtype fields, treating `null` the same as omission.
|
|
21
|
+
- Transaction split requests now accept `null` for `category_id` and `notes`. Omission inherits the parent value, while `null` explicitly clears it for the child.
|
|
20
22
|
|
|
21
23
|
## v2.10.0 - TBD
|
|
22
24
|
- Add v2 crypto endpoints which support:
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Repository instructions
|
|
2
|
+
|
|
3
|
+
## V2 OpenAPI conventions
|
|
4
|
+
|
|
5
|
+
Follow these rules whenever editing `v2/spec/lunch-money-api-v2.yaml`:
|
|
6
|
+
|
|
7
|
+
### Component schemas
|
|
8
|
+
|
|
9
|
+
- Define request and response object payloads as named schemas under `components.schemas`.
|
|
10
|
+
- Reference those component schemas from path operations with `$ref`; do not define object payload schemas inline under `paths`.
|
|
11
|
+
- Give every property in a referenced component schema a description, including wrapper properties, nested objects, array properties, and properties whose shape is supplied by `$ref`.
|
|
12
|
+
- Use a property's description to explain its role in the containing object; do not assume the referenced schema's description provides that context.
|
|
13
|
+
- Give every schema displayed in Scalar's Models section a top-level description.
|
|
14
|
+
- A schema hidden from the Models section does not require a top-level description when its purpose is already clear at every reference site. Add one when it defines reusable semantics or constraints not explained by the referencing property, request body, or response.
|
|
15
|
+
- Remove unreferenced component schemas unless they are intentionally retained for a documented reason.
|
|
16
|
+
|
|
17
|
+
### Scalar model visibility
|
|
18
|
+
|
|
19
|
+
`x-internal: true` hides a component schema from Scalar's Models section. It does not mean the endpoint, payload, or data is private.
|
|
20
|
+
|
|
21
|
+
- Keep primary response-body schemas public by omitting `x-internal` or setting it to `false`.
|
|
22
|
+
- Set `x-internal: true` on request-only schemas and supporting schemas that are not useful as independently browsable models.
|
|
23
|
+
- Keep a shared schema public when it is a useful response model, even if requests or other schemas also reference it.
|
|
24
|
+
- Decide visibility from how the schema is used, not from its name.
|
|
25
|
+
|
|
26
|
+
### Endpoint documentation
|
|
27
|
+
|
|
28
|
+
- Give every operation a concise `summary` and a `description`.
|
|
29
|
+
- Give every path, query, and header parameter a description.
|
|
30
|
+
- Give every response entry a meaningful description.
|
|
31
|
+
- Document endpoint-specific behavior, defaults, side effects, and request or response semantics on the operation or relevant field rather than in a general guide.
|
|
32
|
+
|
|
33
|
+
### Description style
|
|
34
|
+
|
|
35
|
+
- Use direct, neutral, present-tense language from the API consumer's perspective.
|
|
36
|
+
- Use a sentence fragment for a short label or noun phrase, without a terminal period.
|
|
37
|
+
- Use complete sentences for behavior or semantics, with terminal punctuation.
|
|
38
|
+
- When a description contains multiple sentences, punctuate every sentence.
|
|
39
|
+
- Use backticks for property names, parameter names, enum values, and literal values such as `true`, `false`, and `null`.
|
|
40
|
+
- Do not repeat type information unless it clarifies a format, unit, constraint, or semantic detail.
|
|
41
|
+
- Add links when they materially help consumers discover a related endpoint or relevant guide.
|
|
42
|
+
- Do not add links that merely restate obvious navigation.
|
|
43
|
+
|
|
44
|
+
### Examples
|
|
45
|
+
|
|
46
|
+
Examples are selective documentation aids, not a required artifact for every spec change.
|
|
47
|
+
|
|
48
|
+
- Audit affected examples whenever an endpoint, schema, or behavior changes, but edit them only when they become invalid, inaccurate, or misleading.
|
|
49
|
+
- Add an example when it illustrates a new endpoint, a materially different payload shape, or behavior not already clear from the schema and descriptions.
|
|
50
|
+
- Do not add examples mechanically for changes that widen accepted values, such as allowing an optional property to be `null`, when existing examples remain valid and the schema and description explain the behavior.
|
|
51
|
+
- Changes to a type, format, enum, requiredness, default, or representation require examining every affected example. Edit only examples that use or imply the old contract.
|
|
52
|
+
- A new endpoint should normally include a minimal valid request example when it accepts a JSON body and a representative success example when it returns a JSON body. Ask the user before omitting examples when the reason is unclear.
|
|
53
|
+
- When uncertain whether a change benefits from a new example, ask the user rather than adding one speculatively.
|
|
54
|
+
- Put request examples under the request media type, response examples under the applicable status code and media type, and parameter examples on the parameter.
|
|
55
|
+
- Use schema-property examples sparingly for unusual formats or values that are difficult to infer.
|
|
56
|
+
- Use `example` for one representative scenario and `examples` for materially different scenarios.
|
|
57
|
+
- Keep examples concise, fictional, internally consistent, and valid against the applicable schema.
|
|
58
|
+
- Include required properties. Include optional properties only when they help explain the scenario.
|
|
59
|
+
- Give named examples concise, accurate scenario keys. Add a `summary` or `description` only when it contributes information beyond the key and payload.
|
|
60
|
+
- Add endpoint-specific error examples only when the error shape or behavior differs meaningfully from shared standard errors.
|
|
61
|
+
|
|
62
|
+
#### Paired request and response examples
|
|
63
|
+
|
|
64
|
+
Pair request and response examples when seeing the result helps explain a synchronous create or update operation.
|
|
65
|
+
|
|
66
|
+
- Use the same scenario key under the request and corresponding response.
|
|
67
|
+
- Carry submitted values through consistently; use the response to show generated IDs, timestamps, defaults, conversions, inherited values, or other returned fields.
|
|
68
|
+
- Pair invalid request examples with the applicable error response using the same scenario key.
|
|
69
|
+
- Do not pair every request scenario. Add a pair only when the response teaches something useful.
|
|
70
|
+
- Treat singular request and response `example` blocks as an implicit pair and keep shared values consistent.
|
|
71
|
+
- Do not pair examples when the response has no body, processing is asynchronous, or the result does not directly correspond to the submitted payload.
|
|
72
|
+
|
|
73
|
+
When planning or reviewing a spec change, identify the affected schemas, verify their Scalar visibility and descriptions, and audit related request, response, parameter, and error examples. Record example changes only when existing examples become inaccurate or a new scenario materially improves the documentation. When in doubt, ask the user.
|
|
74
|
+
|
|
75
|
+
Before finishing a consumer-visible spec change, follow `../docs/AGENTS.md` to add a concise version-history entry and check whether an existing guide has become factually incorrect.
|