Skip to content

Commit

Permalink
Fix compiler-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Oct 30, 2024
1 parent b2c8ea5 commit a0f6308
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/compiler-rs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Cargo Build & Test

on:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: compiler-rs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install deps
run: |
make setup
make generate
make transform-to-openapi
make transform-expand-generics
- name: Install Rust
run: rustup update stable && rustup default stable

- run: cargo build --verbose
working-directory: compiler-rs

- run: cargo test --verbose
working-directory: compiler-rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ mod tests {
use super::*;

#[test]
#[ignore]
pub fn compare_with_js_version() -> testresult::TestResult {
let canonical_json = {
// Deserialize and reserialize to have a consistent JSON format
Expand Down
4 changes: 3 additions & 1 deletion compiler-rs/openapi_to_clients_schema/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn generate_type_for_schema(
})
}
if let Some(ref docs) = data.external_docs {
base.ext_doc_url = Some(docs.ext_docs_url.clone())
base.ext_doc_url = Some(docs.url.clone())
}

// TODO: data.readonly/writeonly -> OverloadOf?
Expand Down Expand Up @@ -402,6 +402,8 @@ fn generate_interface_def(
required: required.contains(&name),
doc_id: None,
doc_url: None,
ext_doc_id: None,
ext_doc_url: None,
codegen_name: None, // FIXME: extension in workplace search
description: None,
aliases: Vec::default(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@stoplight/spectral-cli": "^6.13.0"
"@stoplight/spectral-cli": "^6.13.1"
}
}

0 comments on commit a0f6308

Please sign in to comment.