Skip to content

Instantly share code, notes, and snippets.

View MaryamAdnan3's full-sized avatar
🎯
Focusing

MaryamAdnan MaryamAdnan3

🎯
Focusing
View GitHub Profile
@MaryamAdnan3
MaryamAdnan3 / connection_pooling.rb
Last active September 1, 2023 06:45
connection pooling
require 'faraday'
class ConnectionPool
# See https://github.com/mperham/connection_pool
def initialize(pool_size: 8, pool_timeout: 5, **connection_config)
@connections = ConnectionPool.new(size: pool_size, timeout: pool_timeout) do
create_connection(**connection_config)
end
end
def connection(&block)
@MaryamAdnan3
MaryamAdnan3 / Swagger Petstore - OpenAPI 3.0.yaml
Created September 1, 2023 07:42
This is a sample Pet Store Server based on the OpenAPI 3.0 specification.
openapi: 3.0.3
info:
title: Swagger Petstore - OpenAPI 3.0
description: |-
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about
Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
You can now help us improve the API whether it's by making changes to the definition itself or to the code.
That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_