Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Release 3.0.0 #356

Merged
merged 5 commits into from
Jul 1, 2016
Merged

Release 3.0.0 #356

merged 5 commits into from
Jul 1, 2016

Conversation

kylef
Copy link
Member

@kylef kylef commented Jun 30, 2016

This releases 3.0.0 of Drafter. I've also updated the homebrew formula to drafter library and header.

Drafter 3.0.0

Breaking

  • Drafter now uses C++11.

    The following compiler versions are supported:

    • Microsoft Visual C++ 2013 or higher
    • GCC 4.8 or higher
    • Clang 3.5 or higher

Enhancements

  • Drafter now provides a full C and C++ API interface, you may now validate, parse and serialize an API Blueprint. Please see drafter.h header for full API documentation.
  • Improve error messages for a few blueprint errors

Bug Fixes

  • Correctly render named primitive types when used as a nested or member type such as items (array[Other Type]) in JSON.
    #312
  • Fixes an issue where defining an implicit object data structure would raise an invalid syntax warning and not be parsed.
    #318
  • Prevent causing an infinite loop when parsing a resource which inherits from itself.
    #328
  • Correctly parse object samples within arrays.
    #246
  • Correctly render JSON Schema when fixed is used on attributes section or named type
    mson#60

@kylef
Copy link
Member Author

kylef commented Jun 30, 2016

Issued a "Do not merge" because I want to get apiaryio/protagonist#157 passing CI first incase we need to change anything here.

@kylef
Copy link
Member Author

kylef commented Jun 30, 2016

Ruby FFI

Using Drafter 3 when libdrafter is installed into your system. You can use Drafter pretty easy using FFI.

require 'ffi'

module Drafter
  extend FFI::Library
  ffi_lib 'drafter'

  attach_function :drafter_version_string, [], :string
  attach_function :drafter_version, [], :int

  attach_function :drafter_check_blueprint, [:string], :pointer
  attach_function :drafter_free_result, [:pointer], :void
end

puts Drafter.drafter_version_string
puts Drafter.drafter_version

blueprint = <<-DOC
# My API
## GET /
DOC

result = Drafter.drafter_check_blueprint(blueprint)
if result
  puts 'good'
else
  puts 'bad'
  Drafter.drafter_free_result(result)
end
$ ruby drafter.rb
v2.3.1
131841
good

@w-vi
Copy link
Contributor

w-vi commented Jun 30, 2016

I guess I should write one for python using ctypes or cffi

@pksunkara
Copy link
Contributor

@kylef Do you think we should update redsnow?

@kylef kylef removed the DO NOT MERGE label Jul 1, 2016
@pksunkara pksunkara merged commit 9c655b9 into master Jul 1, 2016
@pksunkara pksunkara deleted the kylef/release-3.0.0 branch July 1, 2016 11:57
@pksunkara
Copy link
Contributor

@kylef Please tag and release.

@jayniz
Copy link

jayniz commented Dec 9, 2016

@pksunkara

@kylef Do you think we should update redsnow?

yes! yes! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants