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

Elixir #2553

Merged
merged 50 commits into from
Apr 13, 2024
Merged

Elixir #2553

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3db9181
Add testing for Elixir
mitchsayre Feb 28, 2024
87bf1af
Copy the Python renderer code for Elixir
mitchsayre Mar 2, 2024
afaff96
Define forbidden module and field names for Elixir
mitchsayre Mar 2, 2024
9ee11bb
Switch to the Ruby renderer as the base for Elixir
mitchsayre Mar 3, 2024
d80cb9e
Add Elixir fixtures
mitchsayre Mar 3, 2024
bb9090e
Emit descriptions for Elixir structs with @moduledoc decorator
mitchsayre Mar 4, 2024
c3fde6f
Enforce required attributes on Elixir structs
mitchsayre Mar 4, 2024
b4b87b3
Define Elixir struct attributes as atoms
mitchsayre Mar 4, 2024
76eb41f
Emit typespec decorator on Elixir structs
mitchsayre Mar 5, 2024
ab8839d
Emit typespec decorator on Elixir structs
mitchsayre Mar 8, 2024
3ed9973
Configure Elixir test fixture
mitchsayre Mar 9, 2024
dfd0d79
Support running Elixir test fixture
mitchsayre Mar 10, 2024
b80acb8
Emit Elixir from_map() lines for primitive, class, map, and array att…
mitchsayre Mar 12, 2024
efe2d9e
Emit enum types in Elixir
mitchsayre Mar 13, 2024
5e95718
Improve emitted enum code for Elixir
mitchsayre Mar 14, 2024
c6d5f67
Handle lists and enums for Elixir toDynamic fromDynamic
mitchsayre Mar 28, 2024
340e527
Fix union types for @type decorator
mitchsayre Mar 29, 2024
62508f7
Handle fromDynamic for array and map types
mitchsayre Apr 3, 2024
962789a
Switch enum serialize/deserialize to encode/decode
mitchsayre Apr 3, 2024
dda4cd7
Add attribute toDynamic for array and map types
mitchsayre Apr 3, 2024
1ffbf81
Add union type for attribute toDynamic
mitchsayre Apr 3, 2024
9d7f421
Emit decoding pattern match for union type attribute
mitchsayre Apr 3, 2024
b56d877
Handle cases for encoding and decoding unions
mitchsayre Apr 3, 2024
bb18b6c
Pattern match for class types
mitchsayre Apr 3, 2024
5759fa7
Fix incorrect attribute setting in from_map to_map
mitchsayre Apr 4, 2024
e39038f
Fix Atom validation so it only wraps in quotes when necessary
mitchsayre Apr 4, 2024
02a7a14
Support top level arrays
mitchsayre Apr 4, 2024
f6b66bf
Handle reserved words and module names
mitchsayre Apr 5, 2024
8dfe266
Handle more attribute and pattern match cases
mitchsayre Apr 5, 2024
1065a7a
Fix MapType to and from dynamic
mitchsayre Apr 5, 2024
dd3c97a
Support top level types
mitchsayre Apr 5, 2024
3f3ebe5
Setup Elixir testing
mitchsayre Apr 5, 2024
641a03f
Remove commented out code
mitchsayre Apr 5, 2024
f1ed587
Remove unused variables
mitchsayre Apr 5, 2024
115e5f7
Add a namespace option
mitchsayre Apr 6, 2024
65294f2
Emit a comment at the top
mitchsayre Apr 6, 2024
45b1c97
Merge branch 'glideapps:master' into master
mitchsayre Apr 6, 2024
2321218
Fixed JS warnings found by Github workflow
mitchsayre Apr 7, 2024
6b199d4
Fix module descriptions
mitchsayre Apr 10, 2024
e8275f3
Fix pattern matches for map and atom types
mitchsayre Apr 10, 2024
76f33bb
Fix enums so they error on bad values and check for bool before atom
mitchsayre Apr 10, 2024
af81fa7
Finalize Elixir schema tests
mitchsayre Apr 10, 2024
51fb78a
Clean up notes for Elixir skipped tests
mitchsayre Apr 10, 2024
66cf98b
Create temporary elixir.yml
mitchsayre Apr 10, 2024
ac73f7b
Add Elixir to test pr workflow
mitchsayre Apr 10, 2024
640160f
Fix pattern matches for lists and maps with union type items
mitchsayre Apr 10, 2024
544c7bd
Test graphql fixture
mitchsayre Apr 10, 2024
26a2f5f
Remove action used for testing
mitchsayre Apr 10, 2024
d8007e1
Merge branch 'master' into master
mitchsayre Apr 10, 2024
5e95157
Merge branch 'master' into master
dvdsgl Apr 13, 2024
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
8 changes: 8 additions & 0 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- ruby
- php
- scala3,schema-scala3
- elixir,schema-elixir,graphql-elixir

# Partially working
# - schema-typescript # TODO Unify with typescript once fixed
Expand Down Expand Up @@ -176,6 +177,13 @@ jobs:
- run: echo '@main def hello() = println("We need this spam print statement for bloop to exit correctly...")' | scala-cli _
if: ${{ contains(matrix.fixture, 'scala3') }}

- name: Install Elixir
if: ${{ contains(matrix.fixture, 'elixir') }}
uses: erlef/setup-beam@v1
with:
elixir-version: "1.15.7"
otp-version: "26.0"

- run: QUICKTEST=true FIXTURE=${{ matrix.fixture }} npm test

test-complete:
Expand Down
1 change: 1 addition & 0 deletions packages/quicktype-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ export { RubyTargetLanguage, RubyRenderer, rubyOptions } from "./language/ruby";
export { CrystalTargetLanguage, CrystalRenderer } from "./language/Crystal";
export { HaskellTargetLanguage, HaskellRenderer, haskellOptions } from "./language/Haskell";
export { DartTargetLanguage, DartRenderer, dartOptions } from "./language/Dart";
export { ElixirTargetLanguage, ElixirRenderer, elixirOptions } from "./language/Elixir";
2 changes: 2 additions & 0 deletions packages/quicktype-core/src/language/All.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { HaskellTargetLanguage } from "./Haskell";
import { TypeScriptZodTargetLanguage } from "./TypeScriptZod";
import { PhpTargetLanguage } from "./Php";
import { TypeScriptEffectSchemaTargetLanguage } from "./TypeScriptEffectSchema";
import { ElixirTargetLanguage } from "./Elixir";

export const all: TargetLanguage[] = [
new CSharpTargetLanguage(),
Expand Down Expand Up @@ -54,6 +55,7 @@ export const all: TargetLanguage[] = [
new HaskellTargetLanguage(),
new TypeScriptZodTargetLanguage(),
new TypeScriptEffectSchemaTargetLanguage(),
new ElixirTargetLanguage(),
new PhpTargetLanguage()
];

Expand Down
Loading
Loading