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

docs: Add description to README #8

Merged
merged 9 commits into from
Jun 27, 2024
Merged
Changes from all commits
Commits
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
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,40 @@ Build tools for the Seam API using this blueprint.

## Description

TODO
A blueprint is a simplified description of an API schema that is optimized for code and documentation generation.

The blueprint schema assumes the API follows Seam API design guidelines,
and will evolve with those guidelines and any SDK, documentation, or product quality requirements.

The blueprint defines the following core concepts:

- Endpoint: a path that accepts an HTTP request and returns a response.
- Route: the direct parent path of a collection of one or more endpoints.
- Subroute: a route that is nested under another route.
- Namespace: the direct parent path of a collection routes only: there are no endpoints under this path.
Copy link
Contributor

@andrii-balitskyi andrii-balitskyi Jun 27, 2024

Choose a reason for hiding this comment

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

Suggested change
- Namespace: the direct parent path of a collection routes only: there are no endpoints under this path.
- Namespace: the direct parent path of a collection of routes only; there are no endpoints under this path.

Copy link
Contributor

Choose a reason for hiding this comment

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

there are no endpoints under this path.

Does it mean that noise_sensors is also a namespace, besides acs? Although, /noise_sensors could potentially have /get and /list endpoints since we have those for /locks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

/noise_sensors/list should exist if it doesn't, it is not intended to be a namespace.

Copy link
Contributor

Choose a reason for hiding this comment

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

There are no endpoints under /nosie_sensors. What about /noise_sensors/get, should we add it as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, only /nosie_sensors/list

Copy link
Contributor

Choose a reason for hiding this comment

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

- Resource: every endpoint that returns non-empty data returns a resource or a collection of resources.

## Motivation

TODO
The scope of the [OpenAPI Specification](https://swagger.io/specification/) covers arbitrarily complicated APIs,
while the Seam API follows very predictable and simplified API design patterns.
Comment on lines +25 to +26
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the line break intentional here?

Suggested change
The scope of the [OpenAPI Specification](https://swagger.io/specification/) covers arbitrarily complicated APIs,
while the Seam API follows very predictable and simplified API design patterns.
The scope of the [OpenAPI Specification](https://swagger.io/specification/) covers arbitrarily complicated APIs, while the Seam API follows very predictable and simplified API design patterns.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I break long lines in markdown intentionally. It doesn't change the format and it makes diffs / comments easier to target.

Note that linebreaks in github comments / issues do change the format (no idea why their parser is different 🤷🏻 ).


For this reason, Seam has encountered several challenges working directly with the OpenAPI Specification:

- Existing tools built on the OpenAPI Specification cannot meet Seam's requirements or require non-trivial extensions.
- Extending the OpenAPI Specification with non-standard properties to support Seam's SDK and documentation requirements
is not directly compatible with existing tools.
Comment on lines +31 to +32
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here with the line break

Suggested change
- Extending the OpenAPI Specification with non-standard properties to support Seam's SDK and documentation requirements
is not directly compatible with existing tools.
- Extending the OpenAPI Specification with non-standard properties to support Seam's SDK and documentation requirements is not directly compatible with existing tools.

- Seam's requirements and scope are overall simpler than the broad use-cases existing tools based on the OpenAPI Specification are trying to solve.
- All existing Seam tooling must first expend duplicated effort parsing and flattening the OpenAPI Specification into a form more natural to the Seam API.
- This creates a high barrier of entry for working with the Seam API specification
as one must first deeply understand how to parse the OpenAPI Specification for any practical application.

The blueprint addresses these concerns:

- The blueprint module centralizes on a source of truth for parsing the OpenAPI Specification into something usable.
- The blueprint schema matches naturally to the Seam API design and is immediately usable for practical application.
- The blueprint is not limited by the OpenAPI Specification or constrained by the wide scope of supporting any API.
It is optimized for Seam's requirements and can evolve faster to meet Seam's specific concerns and integrate directly with other Seam integrated tooling.
Comment on lines +42 to +43
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Suggested change
- The blueprint is not limited by the OpenAPI Specification or constrained by the wide scope of supporting any API.
It is optimized for Seam's requirements and can evolve faster to meet Seam's specific concerns and integrate directly with other Seam integrated tooling.
- The blueprint is not limited by the OpenAPI Specification or constrained by the wide scope of supporting any API. It is optimized for Seam's requirements and can evolve faster to meet Seam's specific concerns and integrate directly with other Seam integrated tooling.


## Installation

Expand Down