diff --git a/dune-project b/dune-project index 2b05bc7..df5fe57 100644 --- a/dune-project +++ b/dune-project @@ -5,22 +5,21 @@ (generate_opam_files true) (source - (github username/reponame)) + (github ahrefs/ppx_deriving_jsonschema)) -(authors "Author Name") +(authors "ahrefs") -(maintainers "Maintainer Name") +(maintainers "ahrefs") -(license LICENSE) +(license MIT) -(documentation https://url/to/documentation) +(documentation https://github.com/ahrefs/ppx_deriving_jsonschema) (package (name ppx_deriving_jsonschema) - (synopsis "A short synopsis") - (description "A longer description") - (depends ocaml dune) + (synopsis "jsonschema generator for ppx_deriving") + (description + "ppx_deriving_jsonschema is a ppx rewriter that generates jsonschema from ocaml types") + (depends ocaml dune ppxlib) (tags - (topics "to describe" your project))) - -; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html + (jsonschema "org:ahrefs" syntax))) diff --git a/ppx_deriving_jsonschema.opam b/ppx_deriving_jsonschema.opam index b296c11..a3cbf88 100644 --- a/ppx_deriving_jsonschema.opam +++ b/ppx_deriving_jsonschema.opam @@ -1,17 +1,19 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -synopsis: "A short synopsis" -description: "A longer description" -maintainer: ["Maintainer Name"] -authors: ["Author Name"] -license: "LICENSE" -tags: ["topics" "to describe" "your" "project"] -homepage: "https://github.com/username/reponame" -doc: "https://url/to/documentation" -bug-reports: "https://github.com/username/reponame/issues" +synopsis: "jsonschema generator for ppx_deriving" +description: + "ppx_deriving_jsonschema is a ppx rewriter that generates jsonschema from ocaml types" +maintainer: ["ahrefs"] +authors: ["ahrefs"] +license: "MIT" +tags: ["jsonschema" "org:ahrefs" "syntax"] +homepage: "https://github.com/ahrefs/ppx_deriving_jsonschema" +doc: "https://github.com/ahrefs/ppx_deriving_jsonschema" +bug-reports: "https://github.com/ahrefs/ppx_deriving_jsonschema/issues" depends: [ "ocaml" "dune" {>= "3.16"} + "ppxlib" "odoc" {with-doc} ] build: [ @@ -28,4 +30,4 @@ build: [ "@doc" {with-doc} ] ] -dev-repo: "git+https://github.com/username/reponame.git" +dev-repo: "git+https://github.com/ahrefs/ppx_deriving_jsonschema.git" diff --git a/runtime/dune b/runtime/dune index 2e466c3..8b86d45 100644 --- a/runtime/dune +++ b/runtime/dune @@ -1,4 +1,3 @@ (library (name ppx_deriving_jsonschema_runtime) - (public_name ppx_deriving_jsonschema.runtime) - (libraries yojson)) + (public_name ppx_deriving_jsonschema.runtime)) diff --git a/src/dune b/src/dune index 88a2845..915dae3 100644 --- a/src/dune +++ b/src/dune @@ -1,7 +1,7 @@ (library (public_name ppx_deriving_jsonschema) (kind ppx_deriver) - (libraries ppxlib yojson) + (libraries ppxlib) (preprocess (pps ppxlib.metaquot)) - (ppx_runtime_libraries ppx_deriving_jsonschema.runtime yojson)) + (ppx_runtime_libraries ppx_deriving_jsonschema.runtime)) diff --git a/src/ppx_deriving_jsonschema.ml b/src/ppx_deriving_jsonschema.ml index 46d7647..53cfd46 100644 --- a/src/ppx_deriving_jsonschema.ml +++ b/src/ppx_deriving_jsonschema.ml @@ -3,12 +3,12 @@ open Ast_builder.Default let deriver_name = "jsonschema" -let default_attribute = - Attribute.declare "ppx_deriving_yojson.of_yojson.default" Attribute.Context.label_declaration - Ast_pattern.(single_expr_payload __) - (fun expr -> expr) +(* let default_attribute = + Attribute.declare "ppx_deriving_yojson.of_yojson.default" Attribute.Context.label_declaration + Ast_pattern.(single_expr_payload __) + (fun expr -> expr) -let attributes = [ Attribute.T default_attribute ] + let attributes = [ Attribute.T default_attribute ] *) let args () = Deriving.Args.(empty) (* let args () = Deriving.Args.(empty +> arg "option1" (eint __) +> flag "flag") *) diff --git a/test/dune b/test/dune index 7a68d4b..425cf28 100644 --- a/test/dune +++ b/test/dune @@ -19,6 +19,7 @@ (executable (name test) (modules test) + (libraries yojson) (preprocess (pps ppx_deriving_jsonschema)))