Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions .github/workflows/generate-code-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jobs:
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}

- name: Running code sample transformers
run: pnpm transform:merged_code_samples_specs

- name: Copy specs into final_specs
run: |
cp -r ./merged_code_samples_specs/glean-client-merged-code-samples-spec.yaml ./final_specs/client_rest.yaml
cp -r ./merged_code_samples_specs/glean-index-merged-code-samples-spec.yaml ./final_specs/indexing.yaml
cp -r ./modified_code_samples_specs/client_rest.yaml ./final_specs/client_rest.yaml
cp -r ./modified_code_samples_specs/indexing.yaml ./final_specs/indexing.yaml
- name: Commit changes
uses: ./.github/actions/git-commit
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pnpm-lock.yaml
/generated_specs/
/overlayed_specs/
/merged_code_samples_specs/
/modified_code_samples_specs/
/final_specs/

# Speakeasy managed files
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Preprocesses our OpenAPI specs to prepare them for generation via Speakeasy (our

This repository manages several types of OpenAPI specifications in different directories:

| Directory | Purpose |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `source_specs/` | Original OpenAPI specification files provided as input to the transformation process. These are the source of truth for our API definitions. |
| `generated_specs/` | Transformed OpenAPI specs with server URL subpaths moved to individual API paths. These files are consumed by Speakeasy to generate client libraries. |
| `overlayed_specs/` | Specs with various overlays applied (see Overlays section below). The overlays add additional metadata or modifications needed for specific purposes. |
| `merged_code_samples_specs/` | Specs with code samples merged from multiple sources. These enhanced specs provide examples for documentation and developer usage. |
| `final_specs/` | Final, fully proccessed OpenAPI specifications that combine code samples from multiple sources that have been post-processed for correctness. These files are consumed by the gh-pages site and ultimately make their way to developers.glean.com. |
| Directory | Purpose |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `source_specs/` | Original OpenAPI specification files provided as input to the transformation process. These are the source of truth for our API definitions. |
| `generated_specs/` | Transformed OpenAPI specs with server URL subpaths moved to individual API paths. These files are consumed by Speakeasy to generate client libraries. |
| `overlayed_specs/` | Specs with various overlays applied (see Overlays section below). The overlays add additional metadata or modifications needed for specific purposes. |
| `merged_code_samples_specs/` | Specs with code samples merged from multiple sources. These enhanced specs provide examples for documentation and developer usage. |
| `modified_code_samples_specs/` | Specs with code samples post processed (correcting issues with the generated code samples). |
| `final_specs/` | Final, fully proccessed OpenAPI specifications that combine code samples from multiple sources that have been post-processed for correctness. These files are consumed by the gh-pages site and ultimately make their way to developers.glean.com. |

## Overlays

Expand Down Expand Up @@ -47,6 +48,10 @@ The `overlayed_specs` directory contains merged OpenAPI specifications that comb

These merged specs are used for generating consistent client libraries across multiple APIs and provide a single source of documentation.

## Modified Code Samples Specs

This takes the specs from `merged_code_samples_specs` and runs `pnpm transform:merged_code_samples_specs` to correct issues with the generated code samples. This is done in the `.github/workflows/generate-code-samples.yml` GHA workflow.

## Final Specs

The `final_specs` directory contains the end product of all of the processing being done. These specs are copied into the published GitHub Pages site (in the `docs/specs/final` directory), and then used by [gleanwork/glean-developer-site](https://github.com/gleanwork/glean-developer-site).
Expand Down
Loading