This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issued a "Do not merge" because I want to get apiaryio/protagonist#157 passing CI first incase we need to change anything here. |
Ruby FFIUsing Drafter 3 when 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 |
I guess I should write one for python using ctypes or cffi |
@kylef Do you think we should update redsnow? |
@kylef Please tag and release. |
yes! yes! :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Enhancements
drafter.h
header for full API documentation.Bug Fixes
items (array[Other Type])
in JSON.#312
#318
#328
#246
fixed
is used on attributes section or named typemson#60