source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1.rb
Ruby
mit
202
main
593
# frozen_string_literal: true module Skooma module Keywords module OAS31 module SchemaValue def wrap_value(value) return super unless value.is_a?(Hash) || value.is_a?(TrueClass) || value.is_a?(FalseClass) Objects::OpenAPI.new(value, registry: parent_schema.registry, parent: par...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/schema.rb
Ruby
mit
202
main
693
# frozen_string_literal: true module Skooma module Keywords module OAS31 class Schema < JSONSkooma::Keywords::Base self.key = "schema" def evaluate(instance, result) json.evaluate(instance.coerce(json), result) end def each_schema yield json end...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/one_of.rb
Ruby
mit
202
main
1,010
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class OneOf < JSONSkooma::Keywords::Applicator::OneOf self.key = "oneOf" self.value_schema = :array_of_schemas self.depends_on = %w[discriminator] def evaluate(instance, ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/required.rb
Ruby
mit
202
main
1,530
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class Required < JSONSkooma::Keywords::Validation::Required self.key = "required" self.instance_types = "object" self.depends_on = %w[properties] def evaluate(instance, r...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/any_of.rb
Ruby
mit
202
main
1,010
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class AnyOf < JSONSkooma::Keywords::Applicator::AnyOf self.key = "anyOf" self.value_schema = :array_of_schemas self.depends_on = %w[discriminator] def evaluate(instance, ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/properties.rb
Ruby
mit
202
main
1,428
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class Properties < JSONSkooma::Keywords::Applicator::Properties self.key = "properties" self.instance_types = "object" self.value_schema = :object_of_schemas def evaluate...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/additional_properties.rb
Ruby
mit
202
main
2,172
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class AdditionalProperties < JSONSkooma::Keywords::Applicator::AdditionalProperties self.key = "additionalProperties" self.instance_types = "object" self.value_schema = :schema ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/external_docs.rb
Ruby
mit
202
main
243
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class ExternalDocs < JSONSkooma::Keywords::BaseAnnotation self.key = "externalDocs" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/example.rb
Ruby
mit
202
main
233
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class Example < JSONSkooma::Keywords::BaseAnnotation self.key = "example" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/discriminator.rb
Ruby
mit
202
main
1,425
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect # Discriminator keyword is an annotation keyword, # it does not affect validation of allOf/anyOf/oneOf schemas. # See https://github.com/OAI/OpenAPI-Specification/pull/2618 class Discrimi...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/keywords/oas_3_1/dialect/xml.rb
Ruby
mit
202
main
225
# frozen_string_literal: true module Skooma module Keywords module OAS31 module Dialect class Xml < JSONSkooma::Keywords::BaseAnnotation self.key = "xml" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/ref_base.rb
Ruby
mit
202
main
880
# frozen_string_literal: true module Skooma module Objects # A simple object to allow referencing other components in the OpenAPI document. # https://spec.openapis.org/oas/v3.1.0#referenceObject class RefBase < Base # This object cannot be extended with additional properties # and any propert...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/callback.rb
Ruby
mit
202
main
278
# frozen_string_literal: true module Skooma module Objects # https://spec.openapis.org/oas/v3.1.0#callback-object # A map of possible out-of band callbacks related to the parent operation. class Callback < RefBase def kw_classes end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header.rb
Ruby
mit
202
main
564
# frozen_string_literal: true module Skooma module Objects # https://spec.openapis.org/oas/v3.1.0#header-object # The Header Object follows the structure of the Parameter Object. class Header < RefBase def kw_classes [ Base::Keywords::Description, Base::Keywords::Depreca...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/operation.rb
Ruby
mit
202
main
881
# frozen_string_literal: true module Skooma module Objects # Describes a single API operation on a path. # https://spec.openapis.org/oas/v3.1.0#operation-object class Operation < Base def kw_classes [ Base::Keywords::Tags, Base::Keywords::Summary, Base::Keyword...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/media_type.rb
Ruby
mit
202
main
253
# frozen_string_literal: true module Skooma module Objects # https://spec.openapis.org/oas/v3.1.0#media-type-object class MediaType < Base def kw_classes [ Keywords::OAS31::Schema ] end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/response.rb
Ruby
mit
202
main
398
# frozen_string_literal: true module Skooma module Objects # Describes a single response from an API Operation. # https://spec.openapis.org/oas/v3.1.0#responseObject class Response < RefBase def kw_classes [ Base::Keywords::Description, Keywords::Headers, Keywo...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/request_body.rb
Ruby
mit
202
main
389
# frozen_string_literal: true module Skooma module Objects # Describes a single request body. # https://spec.openapis.org/oas/v3.1.0#request-body-object class RequestBody < RefBase def kw_classes [ Base::Keywords::Description, Skooma::Objects::Response::Keywords::Content...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi.rb
Ruby
mit
202
main
2,047
# frozen_string_literal: true module Skooma module Objects # OpenAPI Object – the root object of the OpenAPI document. # https://spec.openapis.org/oas/v3.1.0#openapi-object class OpenAPI < Base attr_writer :json_schema_dialect_uri def kw_classes [ Keywords::Info, ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter.rb
Ruby
mit
202
main
699
# frozen_string_literal: true module Skooma module Objects # https://spec.openapis.org/oas/v3.1.0#parameter-object # Describes a single operation parameter. class Parameter < RefBase def kw_classes [ Keywords::Name, Keywords::In, Base::Keywords::Description, ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/base.rb
Ruby
mit
202
main
614
# frozen_string_literal: true module Skooma module Objects class Base < JSONSkooma::JSONSchema DEFAULT_OPTIONS = { registry: REGISTRY_NAME }.freeze def initialize(value, **options) super(value, **DEFAULT_OPTIONS.merge(options)) end def bootstrap(value) # no...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/components.rb
Ruby
mit
202
main
988
# frozen_string_literal: true module Skooma module Objects # Holds a set of reusable objects for different aspects of the OAS. # https://spec.openapis.org/oas/v3.1.0#components-object class Components < JSONSkooma::JSONNode CLASSES_MAP = { "schemas" => JSONSkooma::JSONSchema, "respo...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item.rb
Ruby
mit
202
main
634
# frozen_string_literal: true module Skooma module Objects # Describes the operations available on a single path. # https://spec.openapis.org/oas/v3.1.0#path-item-object class PathItem < RefBase def kw_classes [ Base::Keywords::Summary, Base::Keywords::Description, ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/post.rb
Ruby
mit
202
main
342
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Post < BaseOperation self.key = "post" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/options.rb
Ruby
mit
202
main
348
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Options < BaseOperation self.key = "options" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/base_operation.rb
Ruby
mit
202
main
1,002
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class BaseOperation < JSONSkooma::Keywords::Base def evaluate(instance, result) return result.discard unless instance["method"] == key if json["responses"].nil? && instance["...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/parameters.rb
Ruby
mit
202
main
424
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Parameters < JSONSkooma::Keywords::Base self.key = "parameters" self.value_schema = :array_of_schemas self.schema_value_class = Objects::Parameter def evaluate(in...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/put.rb
Ruby
mit
202
main
340
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Put < BaseOperation self.key = "put" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end en...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/delete.rb
Ruby
mit
202
main
346
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Delete < BaseOperation self.key = "delete" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/head.rb
Ruby
mit
202
main
342
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Head < BaseOperation self.key = "head" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/patch.rb
Ruby
mit
202
main
344
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Patch < BaseOperation self.key = "patch" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/get.rb
Ruby
mit
202
main
340
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Get < BaseOperation self.key = "get" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end en...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/path_item/keywords/trace.rb
Ruby
mit
202
main
344
# frozen_string_literal: true module Skooma module Objects class PathItem module Keywords class Trace < BaseOperation self.key = "trace" self.depends_on = %w[parameters] self.value_schema = :schema self.schema_value_class = Objects::Operation end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/request_body/keywords/required.rb
Ruby
mit
202
main
408
# frozen_string_literal: true module Skooma module Objects class RequestBody module Keywords class Required < JSONSkooma::Keywords::Base self.key = "required" def evaluate(instance, result) if json.value && instance["body"].value.nil? result.failure("B...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header/keywords/explode.rb
Ruby
mit
202
main
233
# frozen_string_literal: true module Skooma module Objects class Header module Keywords class Explode < JSONSkooma::Keywords::BaseAnnotation self.key = "explode" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header/keywords/schema.rb
Ruby
mit
202
main
343
# frozen_string_literal: true module Skooma module Objects class Header module Keywords class Schema < Skooma::Keywords::OAS31::Schema self.key = "schema" def evaluate(instance, result) return if instance.value.nil? super end end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header/keywords/style.rb
Ruby
mit
202
main
229
# frozen_string_literal: true module Skooma module Objects class Header module Keywords class Style < JSONSkooma::Keywords::BaseAnnotation self.key = "style" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header/keywords/examples.rb
Ruby
mit
202
main
235
# frozen_string_literal: true module Skooma module Objects class Header module Keywords class Examples < JSONSkooma::Keywords::BaseAnnotation self.key = "examples" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header/keywords/required.rb
Ruby
mit
202
main
397
# frozen_string_literal: true module Skooma module Objects class Header module Keywords class Required < JSONSkooma::Keywords::Base self.key = "required" def evaluate(instance, result) if json.value && instance.value.nil? result.failure("Header is requ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header/keywords/content.rb
Ruby
mit
202
main
1,666
# frozen_string_literal: true module Skooma module Objects class Header module Keywords class Content < JSONSkooma::Keywords::Base self.key = "content" self.value_schema = :object_of_schemas self.schema_value_class = Objects::MediaType def evaluate(instance,...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/header/keywords/example.rb
Ruby
mit
202
main
233
# frozen_string_literal: true module Skooma module Objects class Header module Keywords class Example < JSONSkooma::Keywords::BaseAnnotation self.key = "example" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi/keywords/json_schema_dialect.rb
Ruby
mit
202
main
445
# frozen_string_literal: true module Skooma module Objects class OpenAPI module Keywords class JSONSchemaDialect < JSONSkooma::Keywords::Base self.key = "jsonSchemaDialect" self.static = true def initialize(parent_schema, value) super uri = UR...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi/keywords/security.rb
Ruby
mit
202
main
236
# frozen_string_literal: true module Skooma module Objects class OpenAPI module Keywords class Security < JSONSkooma::Keywords::BaseAnnotation self.key = "security" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi/keywords/openapi.rb
Ruby
mit
202
main
1,042
# frozen_string_literal: true module Skooma module Objects class OpenAPI module Keywords class OpenAPI < JSONSkooma::Keywords::BaseAnnotation self.key = "openapi" MAPPING = { "3.1.0" => "https://spec.openapis.org/oas/3.1/schema-base/2022-10-07", "3.1.1" ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi/keywords/components.rb
Ruby
mit
202
main
514
# frozen_string_literal: true module Skooma module Objects class OpenAPI module Keywords class Components < JSONSkooma::Keywords::Base self.key = "components" self.value_schema = :schema self.schema_value_class = Objects::Components def each_schema(&block) ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi/keywords/info.rb
Ruby
mit
202
main
228
# frozen_string_literal: true module Skooma module Objects class OpenAPI module Keywords class Info < JSONSkooma::Keywords::BaseAnnotation self.key = "info" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi/keywords/webhooks.rb
Ruby
mit
202
main
406
# frozen_string_literal: true module Skooma module Objects class OpenAPI module Keywords # Map[string, Path Item Object | Reference Object] ] # example: https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.1/webhook-example.yaml class Webhooks < JSONSkooma::Keywords::B...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/openapi/keywords/paths.rb
Ruby
mit
202
main
4,374
# frozen_string_literal: true module Skooma module Objects class OpenAPI module Keywords class Paths < JSONSkooma::Keywords::Base self.key = "paths" self.value_schema = :object_of_schemas self.schema_value_class = Objects::PathItem ROUTE_REGEXP = /\{([^}]+)}...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/response/keywords/headers.rb
Ruby
mit
202
main
963
# frozen_string_literal: true module Skooma module Objects class Response module Keywords class Headers < JSONSkooma::Keywords::Base self.key = "headers" self.value_schema = :object_of_schemas self.schema_value_class = Objects::Header def evaluate(instance, ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/response/keywords/links.rb
Ruby
mit
202
main
231
# frozen_string_literal: true module Skooma module Objects class Response module Keywords class Links < JSONSkooma::Keywords::BaseAnnotation self.key = "links" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/response/keywords/content.rb
Ruby
mit
202
main
1,716
# frozen_string_literal: true module Skooma module Objects class Response module Keywords class Content < JSONSkooma::Keywords::Base self.key = "content" self.value_schema = :object_of_schemas self.schema_value_class = Objects::MediaType def evaluate(instanc...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/allow_reserved.rb
Ruby
mit
202
main
248
# frozen_string_literal: true module Skooma module Objects class Parameter module Keywords class AllowReserved < JSONSkooma::Keywords::BaseAnnotation self.key = "allowReserved" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/required.rb
Ruby
mit
202
main
514
# frozen_string_literal: true module Skooma module Objects class Parameter module Keywords class Required < JSONSkooma::Keywords::Base self.key = "required" self.depends_on = %w[in name style explode allowReserved allowEmptyValue] def evaluate(instance, result) ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/content.rb
Ruby
mit
202
main
574
# frozen_string_literal: true module Skooma module Objects class Parameter module Keywords class Content < Header::Keywords::Content self.key = "content" self.value_schema = :object_of_schemas self.schema_value_class = Objects::MediaType self.depends_on = %w[...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/value_parser.rb
Ruby
mit
202
main
2,456
# frozen_string_literal: true require "cgi" module Skooma module Objects class Parameter module Keywords module ValueParser class << self def call(instance, result) type = result.sibling(instance, "in")&.annotation raise Error, "Missing `in` key #{...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/in.rb
Ruby
mit
202
main
226
# frozen_string_literal: true module Skooma module Objects class Parameter module Keywords class In < JSONSkooma::Keywords::BaseAnnotation self.key = "in" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/allow_empty_value.rb
Ruby
mit
202
main
252
# frozen_string_literal: true module Skooma module Objects class Parameter module Keywords class AllowEmptyValue < JSONSkooma::Keywords::BaseAnnotation self.key = "allowEmptyValue" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/schema.rb
Ruby
mit
202
main
506
# frozen_string_literal: true module Skooma module Objects class Parameter module Keywords class Schema < Skooma::Keywords::OAS31::Schema self.key = "schema" self.depends_on = %w[in name style explode allowReserved allowEmptyValue] def evaluate(instance, result) ...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/parameter/keywords/name.rb
Ruby
mit
202
main
230
# frozen_string_literal: true module Skooma module Objects class Parameter module Keywords class Name < JSONSkooma::Keywords::BaseAnnotation self.key = "name" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/base/keywords/description.rb
Ruby
mit
202
main
239
# frozen_string_literal: true module Skooma module Objects class Base module Keywords class Description < JSONSkooma::Keywords::BaseAnnotation self.key = "description" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/base/keywords/summary.rb
Ruby
mit
202
main
231
# frozen_string_literal: true module Skooma module Objects class Base module Keywords class Summary < JSONSkooma::Keywords::BaseAnnotation self.key = "summary" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/base/keywords/servers.rb
Ruby
mit
202
main
231
# frozen_string_literal: true module Skooma module Objects class Base module Keywords class Servers < JSONSkooma::Keywords::BaseAnnotation self.key = "servers" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/base/keywords/tags.rb
Ruby
mit
202
main
225
# frozen_string_literal: true module Skooma module Objects class Base module Keywords class Tags < JSONSkooma::Keywords::BaseAnnotation self.key = "tags" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/base/keywords/security.rb
Ruby
mit
202
main
233
# frozen_string_literal: true module Skooma module Objects class Base module Keywords class Security < JSONSkooma::Keywords::BaseAnnotation self.key = "security" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/base/keywords/deprecated.rb
Ruby
mit
202
main
237
# frozen_string_literal: true module Skooma module Objects class Base module Keywords class Deprecated < JSONSkooma::Keywords::BaseAnnotation self.key = "deprecated" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/operation/keywords/operation_id.rb
Ruby
mit
202
main
244
# frozen_string_literal: true module Skooma module Objects class Operation module Keywords class OperationId < JSONSkooma::Keywords::BaseAnnotation self.key = "operationId" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/operation/keywords/callbacks.rb
Ruby
mit
202
main
240
# frozen_string_literal: true module Skooma module Objects class Operation module Keywords class Callbacks < JSONSkooma::Keywords::BaseAnnotation self.key = "callbacks" end end end end end
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/operation/keywords/parameters.rb
Ruby
mit
202
main
1,889
# frozen_string_literal: true module Skooma module Objects class Operation module Keywords class Parameters < JSONSkooma::Keywords::Base self.key = "parameters" self.value_schema = :array_of_schemas self.schema_value_class = Objects::Parameter def initialize...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/operation/keywords/responses.rb
Ruby
mit
202
main
1,430
# frozen_string_literal: true module Skooma module Objects class Operation module Keywords class Responses < JSONSkooma::Keywords::Base self.key = "responses" self.value_schema = :object_of_schemas self.schema_value_class = Objects::Response def evaluate(ins...
github
skryukov/skooma
https://github.com/skryukov/skooma
lib/skooma/objects/operation/keywords/request_body.rb
Ruby
mit
202
main
507
# frozen_string_literal: true module Skooma module Objects class Operation module Keywords class RequestBody < JSONSkooma::Keywords::Base self.key = "requestBody" self.value_schema = :schema self.schema_value_class = Objects::RequestBody def evaluate(instanc...
github
skryukov/skooma
https://github.com/skryukov/skooma
spec/skooma_spec.rb
Ruby
mit
202
main
2,229
# frozen_string_literal: true CONFIGS = { default: proc {}, with_enforce_access_modes: ->(schema) do schema.enforce_access_modes = true end, with_use_patterns_for_path_matching: ->(schema) do schema.use_patterns_for_path_matching = true end }.freeze RSpec.describe Skooma do before(:all) { Skooma.c...
github
skryukov/skooma
https://github.com/skryukov/skooma
spec/spec_helper.rb
Ruby
mit
202
main
369
# frozen_string_literal: true require "skooma" RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_wit...
github
skryukov/skooma
https://github.com/skryukov/skooma
spec/skooma/coverage_store_spec.rb
Ruby
mit
202
main
6,219
# frozen_string_literal: true require "tmpdir" RSpec.describe Skooma::CoverageStore do let(:temporary_dir) { Dir.mktmpdir } let(:temporary_file_path) { File.join(temporary_dir, "skooma_coverage.json") } subject(:coverage_store) { described_class.new(file_path: temporary_file_path) } after do FileUtils....
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/minitest.rb
Ruby
mit
202
main
957
# frozen_string_literal: true ENV["APP_ENV"] = "test" require_relative "test_app" require "minitest/autorun" require "rack/test" require "skooma" describe TestApp do include Rack::Test::Methods include Skooma::Minitest[File.join(__dir__, "openapi.yml"), coverage: :report] def app TestApp["bar"] end ...
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/rspec.rb
Ruby
mit
202
main
1,426
# frozen_string_literal: true ENV["APP_ENV"] = "test" require_relative "test_app" require "rspec/autorun" require "rack/test" require "skooma" RSpec.configure do |config| path_to_openapi = File.join(__dir__, "openapi.yml") config.include Skooma::RSpec[path_to_openapi, coverage: :strict, use_patterns_for_path_ma...
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/test_app.rb
Ruby
mit
202
main
1,240
# frozen_string_literal: true require "sinatra" require "json" module TestApp def self.[](value) items = [ {"foo" => value}, {"foo" => "qux"}, {"foo" => "quux"}, {"foo" => "corge"}, {"foo" => "grault"}, {"foo" => "garply"}, {"foo" => "waldo"}, {"foo" => "fred"}, ...
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/rails_app/app.rb
Ruby
mit
202
main
453
# frozen_string_literal: true require "rails" require "action_controller/railtie" require "rails/test_unit/railtie" require_relative "../test_app" class RailsApp < Rails::Application config.load_defaults Rails::VERSION::STRING.to_f config.eager_load = false config.logger = Logger.new(nil) routes.append do ...
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/rails_app/spec/rails_helper.rb
Ruby
mit
202
main
861
ENV["RAILS_ENV"] = "test" ENV["APP_ENV"] = "test" require_relative "../app" require "rspec/rails" require "skooma" RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.shared_context_metadata_behavior = :...
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/rails_app/spec/requests/openapi_spec.rb
Ruby
mit
202
main
341
require "rails_helper" describe "OpenAPI documents", type: :request do describe "Bar API", :bar_api do subject(:schema) { skooma_openapi_schema } it { is_expected.to be_valid_document } end describe "Baz API", :baz_api do subject(:schema) { skooma_openapi_schema } it { is_expected.to be_valid_...
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/rails_app/spec/requests/bar/bar_spec.rb
Ruby
mit
202
main
1,347
require "rails_helper" describe "Bar API", :bar_api, type: :request do describe "GET /bar" do subject { get "/bar" } it { is_expected.to conform_schema(200) } it "returns correct response" do subject expect(response.parsed_body).to eq({"foo" => "bar"}) end end describe "POST /bar" ...
github
skryukov/skooma
https://github.com/skryukov/skooma
examples/rails_app/spec/requests/baz/baz_spec.rb
Ruby
mit
202
main
623
require "rails_helper" describe "Baz API", :baz_api, type: :request do describe "GET prefixed /baz" do subject { get "/baz" } it { is_expected.to conform_schema(200) } it "returns correct response" do subject expect(response.parsed_body).to eq({"foo" => "baz"}) end end describe "PO...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
graphql_devise.gemspec
Ruby
mit
202
master
2,252
lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'graphql_devise/version' Gem::Specification.new do |spec| spec.name = 'graphql_devise' spec.version = GraphqlDevise::VERSION spec.authors = ['Mario Celi', 'David Revelo'] spec.email ...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
Rakefile
Ruby
mit
202
master
931
# frozen_string_literal: true begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end require 'rdoc/task' RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = 'GraphqlDevise' rdoc.options << '--line-numbers' rdoc.rd...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
Appraisals
Ruby
mit
202
master
6,499
appraise 'rails6.1-graphql1.10' do gem 'sqlite3', '~> 1.5.4' gem 'devise', '>= 4.7' gem 'rails', git: 'https://github.com/rails/rails', branch: '6-1-stable' gem 'graphql', '~> 1.10.0' gem 'factory_bot', '<= 6.4.4' end appraise 'rails6.1-graphql1.11' do gem 'sqlite3', '~> 1.5.4' gem 'public_suffix', '< 5'...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/spec_helper.rb
Ruby
mit
202
master
619
# frozen_string_literal: true if ENV['CI'] && !ENV['SKIP_COVERALLS'] require 'simplecov' require 'coveralls' SimpleCov.formatter = Coveralls::SimpleCov::Formatter SimpleCov.start 'rails' do add_filter ['spec'] end end require 'pry' require 'bundler/setup' require 'graphql_devise' RSpec.configure do |c...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/rails_helper.rb
Ruby
mit
202
master
1,333
# frozen_string_literal: true require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' GQL_DEVISE_ROOT = File.join(File.dirname(__FILE__), '../') require File.expand_path('dummy/config/environment.rb', __dir__) abort('The Rails environment is running in production mode!') if Rails.env.production? require 'rspec/rails' # ...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/graphql/user_queries_spec.rb
Ruby
mit
202
master
2,999
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Users controller specs' do include_context 'with graphql schema test' let(:schema) { DummySchema } let(:user) { create(:user, :confirmed) } let(:field) { 'privateField' } let(:public_message) { 'Field does n...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/factories/admins.rb
Ruby
mit
202
master
235
# frozen_string_literal: true FactoryBot.define do factory :admin do email { Faker::Internet.unique.email } password { Faker::Internet.password } trait :confirmed do confirmed_at { Time.now } end end end
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/factories/users.rb
Ruby
mit
202
master
415
# frozen_string_literal: true FactoryBot.define do factory :user do name { Faker::FunnyName.two_word_name } email { Faker::Internet.unique.email } password { Faker::Internet.password } trait :confirmed do confirmed_at { Time.now } end trait :locked do locked_at { Time....
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/factories/users_customers.rb
Ruby
mit
202
master
256
# frozen_string_literal: true FactoryBot.define do factory :users_customer, class: 'Users::Customer' do name { Faker::FunnyName.two_word_name } email { Faker::Internet.unique.email } password { Faker::Internet.password } end end
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/factories/schema_users.rb
Ruby
mit
202
master
297
# frozen_string_literal: true FactoryBot.define do factory :schema_user do name { Faker::FunnyName.two_word_name } email { Faker::Internet.unique.email } password { Faker::Internet.password } trait :confirmed do confirmed_at { Time.zone.now } end end end
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/factories/guests.rb
Ruby
mit
202
master
235
# frozen_string_literal: true FactoryBot.define do factory :guest do email { Faker::Internet.unique.email } password { Faker::Internet.password } trait :confirmed do confirmed_at { Time.now } end end end
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/resource_loader_spec.rb
Ruby
mit
202
master
4,387
# frozen_string_literal: true require 'rails_helper' RSpec.describe GraphqlDevise::ResourceLoader do describe '#call' do subject(:loader) { described_class.new(resource, options, routing).call(query, mutation) } let(:query) { class_double(GraphQL::Schema::Object) } let(:mutation) { class_double(Grap...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/schema_plugin_spec.rb
Ruby
mit
202
master
794
# frozen_string_literal: true require 'spec_helper' RSpec.describe GraphqlDevise::SchemaPlugin do describe '#call' do subject(:plugin) { described_class.new(query: query, mutation: mutation, resource_loaders: loaders) } let(:query) { instance_double(GraphQL::Schema::Object) } let(:mutation) { instan...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/mount_method/option_sanitizer_spec.rb
Ruby
mit
202
master
3,099
# frozen_string_literal: true require 'spec_helper' RSpec.describe GraphqlDevise::MountMethod::OptionSanitizer do subject(:clean_options) { described_class.new(options, supported_options).call! } describe '#call!' do let(:supported_options) do { my_string: GraphqlDevise::MountMethod::Option...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/mount_method/options_validator_spec.rb
Ruby
mit
202
master
1,469
# frozen_string_literal: true require 'spec_helper' RSpec.describe GraphqlDevise::MountMethod::OptionsValidator do describe '#validate!' do subject { -> { described_class.new([validator1, validator2]).validate! } } let(:validator1) { double(:validator1, 'validate!': nil) } let(:validator2) { double(:va...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/mount_method/operation_preparer_spec.rb
Ruby
mit
202
master
1,094
# frozen_string_literal: true require 'rails_helper' RSpec.describe GraphqlDevise::MountMethod::OperationPreparer do describe '#call' do subject(:prepared_operations) do described_class.new( model: model, selected_operations: selected, preparer: prepa...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/mount_method/operation_sanitizer_spec.rb
Ruby
mit
202
master
1,016
# frozen_string_literal: true require 'rails_helper' RSpec.describe GraphqlDevise::MountMethod::OperationSanitizer do describe '.call' do subject { described_class.call(default: default, only: only, skipped: skipped) } let(:op_class1) { Class.new } let(:op_class2) { Class.new } let(:op_class3) { Cl...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb
Ruby
mit
202
master
488
# frozen_string_literal: true require 'spec_helper' RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::GqlNameSetter do describe '#call' do subject(:prepared_operation) { described_class.new(mapping_name).call(operation) } let(:operation) { double(:operation) } let(:mapping_name) { 'user...
github
graphql-devise/graphql_devise
https://github.com/graphql-devise/graphql_devise
spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb
Ruby
mit
202
master
890
# frozen_string_literal: true require 'spec_helper' RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::MutationFieldSetter do describe '#call' do subject(:prepared_operation) { described_class.new(field_type).call(operation, authenticatable: authenticatable) } let(:operation) { double(:operati...