webspicy 0.21.3 → 0.21.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba04baed1cda2292312644692901a18bc5a24f04a27be985a27097417ed731a9
|
4
|
+
data.tar.gz: 67edeff75f3cc4064c197efbd65b2bc4533b7214033226e31092b19f21bdc355
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 560122db62b3024ad5ab6c76f171438e2c45ed4bc1b23fcc9af895e444a7c86ba655826f59d1719ed3020e6bc75d224a072717391ab0862a09f37cb96f89c61a
|
7
|
+
data.tar.gz: 1ffb6d303cfcec6cc4d19c3f03c94f54acd16e50246f73171d00ab878229bf6fe16b18e4c16f9f8c139ca0557134d1b2c66af53c0c4c5cc3ef68782bd32c4710
|
data/lib/webspicy/version.rb
CHANGED
@@ -13,13 +13,13 @@ module Webspicy
|
|
13
13
|
end
|
14
14
|
attr_reader :config, :generator
|
15
15
|
|
16
|
-
def call
|
16
|
+
def call(info = {})
|
17
17
|
{
|
18
18
|
openapi: "3.0.2",
|
19
19
|
info: {
|
20
20
|
version: "1.0.0",
|
21
|
-
title: "
|
22
|
-
},
|
21
|
+
title: "Webspicy Specification"
|
22
|
+
}.merge(info),
|
23
23
|
paths: paths
|
24
24
|
}
|
25
25
|
end
|
@@ -6,23 +6,45 @@ module Webspicy
|
|
6
6
|
module Web
|
7
7
|
module Openapi
|
8
8
|
describe Generator do
|
9
|
-
|
10
|
-
let(:config) {
|
9
|
+
let(:config) do
|
11
10
|
Configuration.new(restful_folder)
|
12
|
-
|
11
|
+
end
|
13
12
|
|
14
|
-
subject
|
15
|
-
ruby_objs = Generator.new(config).call
|
13
|
+
subject do
|
14
|
+
ruby_objs = Generator.new(config).call(info)
|
16
15
|
JSON.parse(ruby_objs.to_json)
|
17
|
-
|
16
|
+
end
|
18
17
|
|
19
|
-
|
18
|
+
let(:info) do
|
19
|
+
{}
|
20
|
+
end
|
21
|
+
|
22
|
+
def openapi_document
|
20
23
|
document = Openapi3Parser.load(subject)
|
21
|
-
#puts JSON.pretty_generate(subject)
|
22
24
|
document.errors.each do |err|
|
23
25
|
puts err.inspect
|
24
26
|
end unless document.errors.empty?
|
25
|
-
|
27
|
+
document
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'works fine' do
|
31
|
+
expect(openapi_document.errors).to be_empty
|
32
|
+
expect(openapi_document.info.title).to eql('Webspicy Specification')
|
33
|
+
end
|
34
|
+
|
35
|
+
describe 'when passing specific info' do
|
36
|
+
let(:info) {
|
37
|
+
{
|
38
|
+
version: '1.1.1',
|
39
|
+
title: 'Webspicy API'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
it 'takes it into account' do
|
44
|
+
expect(openapi_document.errors).to be_empty
|
45
|
+
expect(openapi_document.info.title).to eql('Webspicy API')
|
46
|
+
expect(openapi_document.info.version).to eql('1.1.1')
|
47
|
+
end
|
26
48
|
end
|
27
49
|
|
28
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webspicy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Lambeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -408,7 +408,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
408
408
|
- !ruby/object:Gem::Version
|
409
409
|
version: '0'
|
410
410
|
requirements: []
|
411
|
-
rubygems_version: 3.3.
|
411
|
+
rubygems_version: 3.3.26
|
412
412
|
signing_key:
|
413
413
|
specification_version: 4
|
414
414
|
summary: Webspicy helps testing web services as software operation black boxes!
|