gapic-generator/lib/gapic/schema/api.rb
# Structured representation of the inline samples configuration files.
# @return [Array<Hash>]
#   An array of the incode sample configuration hashes, sorted by sample_type.
Structured representation of the inline samples configuration files.
Structured representation of the inline samples configuration files .
def incode_samples
        @incode_samples ||= begin
          supported_types = [
            "com.google.api.codegen.SampleConfigProto",
            "com.google.api.codegen.samplegen.v1p2.SampleConfigProto"
          ]
          samples.select { |sample_file| supported_types.include? sample_file["type"] }
                 .select { |sample_file| sample_file["schema_version"] == "1.2.0" }
                 .map { |sample_file| sample_file["samples"] }
                 .flatten.compact
                 .select { |sample_config| sample_config["sample_type"]&.start_with? "incode/" }
                 .sort_by { |sample_config| sample_config["sample_type"] }
        end
      end
def incode_samples @incode_samples ||= begin supported_types = [ "com.google.api.codegen.SampleConfigProto" , "com.google.api.codegen.samplegen.v1p2.SampleConfigProto" ] samples . select { | sample_file | supported_types . include? sample_file [ "type" ] } . select { | sample_file | sample_file [ "schema_version" ] == "1.2.0" } . map { | sample_file | sample_file [ "samples" ] } . flatten . compact . select { | sample_config | sample_config [ "sample_type" ] &. start_with? "incode/" } . sort_by { | sample_config | sample_config [ "sample_type" ] } end end
Structured representation of the inline samples configuration files.
Structured representation of the inline samples configuration files .
An array of the incode sample configuration hashes, sorted by sample_type.
An array of the incode sample configuration hashes sorted by sample_type .
Array<Hash>