petstore_api
mohanadarshanvivekanandalingam/petstore_api
Prints "Hello, World!" with a main function. [//]: # (above is the module summary)
Module Overview
Provides an overview about the module when generating the API documentations. For example, refer to https://lib.ballerina.io/ballerina/io/latest
Clients
petstore_api: Client
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at http://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.
Some useful links:
Constructor
Gets invoked to initialize the connector
.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://9ed865fb-bc42-4d51-ba77-92afd494df76-prod.e1-us-east-azure.choreoapis.dev/u7tw/petstore/1.0.0" - URL of the target service
updatePet
Update an existing pet
Parameters
- payload Pet - Update an existent pet in the store
addPet
Add a new pet to the store
Parameters
- payload Pet - Create a new pet in the store
findPetsByTags
Finds Pets by tags
Parameters
- tags string[]? (default ()) - Tags to filter by
getPetById
Find pet by ID
Parameters
- petId int - ID of pet to return
updatePetWithForm
Updates a pet in the store with form data
Parameters
- petId int - ID of pet that needs to be updated
- name string? (default ()) - Name of pet that needs to be updated
- status string? (default ()) - Status of pet that needs to be updated
deletePet
Deletes a pet
uploadFile
function uploadFile(int petId, byte[] payload, string? additionalMetadata) returns ApiResponse|error
uploads an image
Parameters
- petId int - ID of pet to update
- payload byte[] -
- additionalMetadata string? (default ()) - Additional Metadata
Return Type
- ApiResponse|error - successful operation
Records
petstore_api: ApiResponse
Fields
- code int? -
- 'type string? -
- message string? -
petstore_api: Category
Fields
- id int? -
- name string? -
petstore_api: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
petstore_api: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth OAuth2ClientCredentialsGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
petstore_api: OAuth2ClientCredentialsGrantConfig
OAuth2 Client Credentials Grant Configs
Fields
- Fields Included from *OAuth2ClientCredentialsGrantConfig
- tokenUrl string(default "https://sts.choreo.dev:443/oauth2/token") - Token URL
petstore_api: Pet
Fields
- id int? -
- name string -
- category Category? -
- photoUrls string[] -
- tags Tag[]? -
- status string? - pet status in the store
petstore_api: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
petstore_api: Tag
Fields
- id int? -
- name string? -
Import
import mohanadarshanvivekanandalingam/petstore_api;
Metadata
Released date: over 1 year ago
Version: 1.0.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Other versions
1.0.0
Dependencies