Skip to content

Commit

Permalink
cleanup opam file
Browse files Browse the repository at this point in the history
  • Loading branch information
Khady committed Sep 21, 2024
1 parent d9a3ef9 commit 975e867
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 30 deletions.
21 changes: 10 additions & 11 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
22 changes: 12 additions & 10 deletions ppx_deriving_jsonschema.opam
Original file line number Diff line number Diff line change
@@ -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: [
Expand All @@ -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"
3 changes: 1 addition & 2 deletions runtime/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
(library
(name ppx_deriving_jsonschema_runtime)
(public_name ppx_deriving_jsonschema.runtime)
(libraries yojson))
(public_name ppx_deriving_jsonschema.runtime))
4 changes: 2 additions & 2 deletions src/dune
Original file line number Diff line number Diff line change
@@ -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))
10 changes: 5 additions & 5 deletions src/ppx_deriving_jsonschema.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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") *)
Expand Down
1 change: 1 addition & 0 deletions test/dune
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
(executable
(name test)
(modules test)
(libraries yojson)
(preprocess
(pps ppx_deriving_jsonschema)))

Expand Down

0 comments on commit 975e867

Please sign in to comment.