From 207c66fe94baeb5e05fec10b5cd6097099919e56 Mon Sep 17 00:00:00 2001 From: Connor Sullivan Date: Sat, 9 Sep 2023 19:37:11 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20person=20file=20to=20pe?= =?UTF-8?q?ople?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renames `person.tsp` to `people.tsp` because SWAPI uses the plural name in most documentation. Includes this in the new CONTRIBUTING documentation. Moves some existing developing documentation from README into the new documentation. --- CONTRIBUTING.md | 20 ++++++++++++++++++++ README.md | 16 ---------------- src/main.tsp | 2 +- src/{person.tsp => people.tsp} | 0 4 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 CONTRIBUTING.md rename src/{person.tsp => people.tsp} (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..fba78a0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,20 @@ +# Contributing + +## Developing + +### Run scripts + +Use `npm run` to list all available scripts. The `release` script executes a +“release build.” The CI build uses this script. + +### Directory structure + +- [src](./src) contains the TypeSpec (`.tsp`) files + +## TypeSpec conventions + +- Separate files by type. Name files using the plural form, which SWAPI uses + in its documentation. + +- Using `@resource` adds _all_ REST operations. Thus, the spec files explicitly + configure `list` and `read` operations because SWAPI only supports those. diff --git a/README.md b/README.md index bc526f2..a40be0f 100644 --- a/README.md +++ b/README.md @@ -34,21 +34,5 @@ Follow these steps to consume the generated Open API specification for SWAPI. ./node_modules/swapi-typespec/swapi.openapi.yaml ``` -## Developing - -### Run scripts - -Use `npm run` to list all available scripts. The `release` script executes a -“release build.” The CI build uses this script. - -### Directory structure - -- [src](./src) contains the TypeSpec (`.tsp`) files - -### Notes - -- Using `@resource` adds _all_ REST operations. Thus, the spec files explicitly - configure `list` and `read` operations because SWAPI only supports those. - [swapi]: https://swapi.dev [typespec]: https://microsoft.github.io/typespec/ diff --git a/src/main.tsp b/src/main.tsp index 01fb5d5..4b65363 100644 --- a/src/main.tsp +++ b/src/main.tsp @@ -1,2 +1,2 @@ import "./root.tsp"; -import "./person.tsp"; +import "./people.tsp"; diff --git a/src/person.tsp b/src/people.tsp similarity index 100% rename from src/person.tsp rename to src/people.tsp