Skip to content

v0.3.0

Latest

Choose a tag to compare

@milmazz milmazz released this 29 Nov 22:48
f88eccb

This release makes the formatter work with ExDoc v0.40.1 and later. ExDoc v0.40 revamped its formatter API.

Enhancements

  • Implement the ExDoc.Formatter behaviour introduced in ExDoc v0.40
  • The project description is now the one ExDoc was given, instead of being read from the Mix project running the formatter. This also makes the formatter usable outside of Mix
  • Add source_url to the top-level information
  • Add id and defaults to functions, callbacks, and types
  • Add name to functions and callbacks, and group to types
  • Add id and nested_context to modules
  • Add type to extras, and export extras that link to an external URL
  • Documentation in the application/erlang+html format is exported as HTML instead of failing to be encoded
  • Modules of a kind unknown to the formatter are listed under modules instead of being left out
  • The generated file is listed in ExDoc's .build.json, so ExDoc cleans it up when the project is renamed
  • Documentation is generated faster: extras are no longer rendered to HTML and autolinked only to be discarded, and the JSON is written without building it in memory as a single binary

Backwards incompatible changes

  • Require ExDoc v0.40.1 or later and Elixir ~> 1.15
  • docs_groups now lists the groups that have members, including Types, as reported by ExDoc
  • docs and typespecs are ordered by group, and by name within each group
  • Opaque types no longer have the opaque annotation, as ExDoc stopped adding it: their type is still opaque
  • Remove rendered_doc from functions and types: it was always null
  • Remove title_content from extras: use title
  • ExDoc.Formatter.JSON.run now takes three arguments (the formatter configuration, the modules, and the extras), as required by ExDoc

Package: https://hex.pm/packages/ex_doc_json/0.3.0
Documentation: https://hexdocs.pm/ex_doc_json/0.3.0