### Docker Build Setup and Teardown Source: https://bitbucket.org/leondevteam/api-documentation/pipelines/results/1694/steps/%7B94647a31-302b-475b-91f5-6ed6c9ef7cc7%7D Demonstrates the Docker build process, including setup and teardown phases. This is part of the pipeline execution. ```docker # Docker build setup # ... commands for setting up the build environment ... # Docker build teardown # ... commands for cleaning up after the build ... ``` -------------------------------- ### Flight Support Integration Configuration and Usage Source: https://bitbucket.org/leondevteam/api-documentation/commits/02317c80831a26dc9d2c7b19c67de42eba98b42a This section details how to configure and use the Flight Support integration. It references external documentation for in-depth guides on setup and making requests. ```markdown The functionality of the integration from a Leon user's point of view is described in the Leon Software Wiki, where you can find the description of: -- [Integration configuration](https://wiki.leonsoftware.com/leon/integrations#flight-support-service-providers-and-suppliers) -- [Making a request](https://wiki.leonsoftware.com/leon/checklist#integrated-flight-service-providers-and-suppliers) If you encounter any issues and cannot find the solution in the documentation, please contact us via the [Customer Portal](https://customer.leon.aero/). ``` -------------------------------- ### Pipeline Configuration Example Source: https://bitbucket.org/leondevteam/api-documentation/pipelines/results/1685 An example of a pipeline configuration file, likely for Bitbucket Pipelines, showing a step for generating schema changelogs. ```YAML custom: gql-schema-changelogs - file: bitbucket-pipelines.yml line: 1 description: Add API documentation note about token refresh throttling limits and 429 error ``` -------------------------------- ### Bitbucket Pipelines Configuration Example Source: https://bitbucket.org/leondevteam/api-documentation/deployments An example of a bitbucket-pipelines.yml file showing how to configure deployment tracking. This file defines the steps and configurations for Bitbucket Pipelines. ```yaml xxxxxxxxxx ``` -------------------------------- ### Subscription Webhook Example Source: https://bitbucket.org/leondevteam/api-documentation/src/ff08102f49c0db6ee521946b317821e585703c05 Documentation for subscription webhooks, including an example of a mutation fix, as noted in the commit message 'Webhook.md fix sample mutation'. ```APIDOC subscriptions/Webhook.md ``` -------------------------------- ### Get Flight Checklist Item Due Date List Source: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries Provides an example for retrieving a list of due dates for flight checklist items. This is useful for tracking and managing flight-related tasks. ```APIDOC getFlightChecklistItemDueDateList: description: Retrieves a list of due dates for flight checklist items. method: GET path: /flights/checklist/duedates parameters: - name: flightId in: query description: The ID of the flight. required: true schema: type: string responses: 200: description: A list of checklist items with their due dates. content: application/json: schema: type: array items: type: object properties: item: { type: string } dueDate: { type: string, format: date } 404: description: Flight not found. ``` -------------------------------- ### Leon API FAQ: Sample Queries Source: https://bitbucket.org/leondevteam/api-documentation/src/e34a3f2e9bb6129cb2aaaee6b0568a5aca0a8e1b Directs users to the location of sample queries for the Leon API, providing a link to a directory on Bitbucket. ```APIDOC Where can I find sample queries? Please visit [sample queries directory](https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/) ``` -------------------------------- ### API Documentation Overview Source: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07/README This section provides the main entry point for API documentation. It links to the full API documentation hosted on Bitbucket. ```APIDOC API Documentation: https://bitbucket.org/leondevteam/api-documentation ``` -------------------------------- ### Accessing Sample Queries for Leon API Source: https://bitbucket.org/leondevteam/api-documentation/src/b3c532e23f2c7bb86c4cedefee5123e9a3ce9139 Directs users to the location of sample queries for the Leon API. Developers can find example queries in a dedicated directory linked from this documentation. ```Markdown _Where can I find sample queries > Please visit [sample queries directory](https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/) ``` -------------------------------- ### GraphQL Schema Validation Example Source: https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425 Provides examples and guidance on validating code against the GraphQL schema. ```APIDOC validation-example: description: Examples for code validation against GraphQL schema. related_pull_request: #9 ``` -------------------------------- ### GraphQL Query Example Source: https://bitbucket.org/leondevteam/api-documentation/commits/880bed79e3e339daafbf39745069842604613eb5 An example of a GraphQL query to fetch aircraft types based on a wildcard. ```graphql query { aircraftTypeList(wildcard: "CL30") { acftTypeId, iCAO } } ``` -------------------------------- ### Add reservationList Example Source: https://bitbucket.org/leondevteam/api-documentation/commits/be18637eb16804749a09a93b082e2fa1c63c30a2 This commit adds an example for reservationList, likely demonstrating its usage or structure within the API. ```APIDOC reservationList example This commit introduces an example for the reservationList functionality. Further details on the structure and usage of reservationList are expected to be found within the associated code or documentation. ``` -------------------------------- ### FAQ - Sample Queries Source: https://bitbucket.org/leondevteam/api-documentation/src/682baf707624f04d95b935b9ab12952d92e99f55 Information on where to find sample queries for the Leon API, directing users to a specific directory within the Bitbucket repository. ```APIDOC FAQ: - Sample Queries Location: - Directory: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/ ``` -------------------------------- ### Sample Queries Location Source: https://bitbucket.org/leondevteam/api-documentation/src/cb9a6b983553bad753866dcd7e37ea7befd32a07 Information on where to find sample queries for the Leon API. A directory link is provided for developers to access example queries. ```APIDOC Sample Queries: Location: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/ ``` -------------------------------- ### Accessing Sample Queries Source: https://bitbucket.org/leondevteam/api-documentation/src/ff08102f49c0db6ee521946b317821e585703c05 Provides a direct link to the repository's sample queries directory for developers seeking examples of how to interact with the API. ```APIDOC Sample Queries: Location: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/ ``` -------------------------------- ### GraphQL Query Example Source: https://bitbucket.org/leondevteam/api-documentation/commits/2076deb3b4cedad13fb6d371f18c51447e32be8a An example of how to query the GraphQL API to fetch a list of aircraft types, demonstrating the use of an access token. ```bash curl -X POST https://sandbox.leon.aero/graphql \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ --data-binary '{"query":"query {\n aircraftTypeList(wildcard: \"CL30\") {\n acftTypeId,\n iCAO\n }\n}"}' ``` -------------------------------- ### Validation Example - GraphQL Schema Source: https://bitbucket.org/leondevteam/api-documentation/src/ff08102f49c0db6ee521946b317821e585703c05 Contains an example related to code validation against a GraphQL schema, as indicated by the commit message 'Merged in Describe-code-validation-against-GraphQL-schema'. ```APIDOC validation-example/ ``` -------------------------------- ### Bitbucket Pipeline Build Steps Source: https://bitbucket.org/leondevteam/api-documentation/pipelines/results/1695/steps/%7B4e1d5a0a-b710-476a-99cf-6bf93ef7fea7%7D Details the build process within the Bitbucket pipeline, including setup, script execution, and teardown phases. ```APIDOC Pipeline: Build: docker: - image: "build-image" steps: - step: name: Build setup script: - echo "Setting up build environment" - step: name: Run update-changelogs script script: - ./scripts/update-changelogs.sh - step: name: Build teardown script: - echo "Cleaning up build environment" ``` -------------------------------- ### Webhook Mutation Example Source: https://bitbucket.org/leondevteam/api-documentation/src/cb9a6b983553bad753866dcd7e37ea7befd32a07 This entry provides an example of a mutation for webhooks, with a fix to the sample mutation. The last update was on February 17, 2023. ```APIDOC Webhook.md fix sample mutation Description: Fixes a sample mutation for webhooks. Last Updated: 2023-02-17 ``` -------------------------------- ### Accessing Sample Queries Source: https://bitbucket.org/leondevteam/api-documentation/index Provides a link to the directory containing sample queries for the Leon API, useful for developers to understand API usage patterns. ```APIDOC Sample Queries: - Sample queries are available in the official documentation repository. - Access the directory here: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/ ``` -------------------------------- ### Sample Queries Location Source: https://bitbucket.org/leondevteam/api-documentation/src/b32958324ec7cd9ec3fe1e1b92a49036f97beecb Sample queries for the Leon API can be found in the dedicated sample queries directory on Bitbucket. ```Markdown Please visit [sample queries directory](https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/) ``` -------------------------------- ### GraphQL API Response Example Source: https://bitbucket.org/leondevteam/api-documentation/src/dcecc061c19b9a5dea54548fd5dc1fff793d6d9b/authentication/ApiKey This is an example of a JSON response received from the leon.aero GraphQL API after a successful query for aircraft types. ```json { "data": { "aircraftTypeList": [ { "acftTypeId": "CL30", "iCAO": "CL30" }, { "acftTypeId": "BDC30", "iCAO": "CL30" }, { "acftTypeId": "CL301", "iCAO": "CL30" } ] } } ``` -------------------------------- ### Sample Queries Location Source: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07 Information on where to find sample queries for the Leon API. A link to the sample queries directory is provided. ```APIDOC Sample Queries: Link: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/ ``` -------------------------------- ### RFQs Data Example Source: https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425/sample-queries Contains example data for RFQs (Request for Quotation). This file is essential for understanding the format and content of RFQ requests and responses. ```APIDOC rfqs.txt: - Provides sample data for Request for Quotations (RFQs). - Structures include details like the RFQ number, status, creation date, and relevant parties. ``` -------------------------------- ### Sample Queries Source: https://bitbucket.org/leondevteam/api-documentation/src/ff08102f49c0db6ee521946b317821e585703c05 Provides sample queries for interacting with the API, with a recent commit clarifying the flight support service availability list. ```APIDOC sample-queries/ ``` -------------------------------- ### OAuth 2.0 Resources Source: https://bitbucket.org/leondevteam/api-documentation/commits/a8f21e5b401c321b46f934340bd5e35b0f9f8f90 Provides links to external resources for learning and testing OAuth 2.0 flows. Includes a step-by-step example flow and an interactive playground. ```markdown 1. [OAuth 2.0 Simplified - Example Flow](https://www.oauth.com/oauth2-servers/server-side-apps/example-flow/) - step-by-step example flow at OAuth.com 2. [Oauth 2.0 playground](https://www.oauth.com/playground/index.html) - OAuth Playground at OAuth.com ``` -------------------------------- ### Sample Queries Location Source: https://bitbucket.org/leondevteam/api-documentation/src/19be8568e491a6bf9a91f5d87854922e0893df26 Information on where to find sample queries for the Leon API. ```APIDOC Sample Queries: Location: Sample queries directory. Link: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/ ``` -------------------------------- ### Reservation List Example Source: https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425/sample-queries Provides an example of a reservation list, likely used for managing flight or service reservations. This format is useful for understanding the structure of reservation data. ```APIDOC reservationList.txt: - Represents a list of reservations. - Each reservation object contains details such as booking information, passenger details, and flight segments. ``` -------------------------------- ### Recommended GraphQL Tools for Leon API Source: https://bitbucket.org/leondevteam/api-documentation/src/b32958324ec7cd9ec3fe1e1b92a49036f97beecb Highlights recommended tools for interacting with the Leon GraphQL API, including Prisma Playground for its IDE-like experience and Altair GraphQL Client. ```APIDOC Recommended Tools for GraphQL APIs: - Prisma Playground: An IDE for GraphQL, offering a convenient way to connect to the Leon API. [https://github.com/prisma/graphql-playground](https://github.com/prisma/graphql-playground) - Altair GraphQL Client: Another recommended tool for interacting with GraphQL APIs. [https://altairgraphql.dev/](https://altairgraphql.dev/) ``` -------------------------------- ### Maintenance List Example Source: https://bitbucket.org/leondevteam/api-documentation/commits/3bde73c6ba12883f846b679000abfbf6c8b004a2 This snippet provides an example of a maintenance list, likely used within the API documentation context. It details the structure and content of a maintenance list. ```APIDOC maintenanceList: - id: 1 name: "Server Maintenance" description: "Scheduled server maintenance for system updates." startDate: "2023-10-26T10:00:00Z" endDate: "2023-10-26T12:00:00Z" status: "Scheduled" - id: 2 name: "Database Backup" description: "Routine database backup and optimization." startDate: "2023-10-27T02:00:00Z" endDate: "2023-10-27T03:00:00Z" status: "Completed" ``` -------------------------------- ### Sample Queries Directory Source: https://bitbucket.org/leondevteam/api-documentation/src/f2ef61d11b734c3a34f3b98b6d22e155047f11f7/README A link to the directory containing sample queries for the Leon API, useful for developers to understand how to interact with the API. ```APIDOC Sample Queries: Please visit [sample queries directory](https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/) ``` -------------------------------- ### API Response Example Source: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07/authentication/ApiKey This is an example of a JSON response received from the Leon API after executing a GraphQL query. It shows the structure of the returned data, including a list of aircraft types. ```json { "data": { "aircraftTypeList": [ { "acftTypeId": "CL30", "iCAO": "CL30" }, { "acftTypeId": "BDC30", "iCAO": "CL30" }, { "acftTypeId": "CL301", "iCAO": "CL30" } ] } } ``` -------------------------------- ### GraphQL Query Example Source: https://bitbucket.org/leondevteam/api-documentation/src/c403d52874da727f1a4dfa90ff7250fd572a4f2a Demonstrates how to query aircraft types using GraphQL, specifying the desired fields. This example shows fetching `acftTypeId` and `iCAO` for aircraft matching a wildcard. ```graphql query { aircraftTypeList(wildcard: "CL30") { acftTypeId, iCAO } } ``` -------------------------------- ### API Documentation Overview Source: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07/standard-workflows/flight-support Provides an overview and navigation links for the API documentation hosted on Bitbucket. ```APIDOC API Documentation: URL: https://bitbucket.org/leondevteam/api-documentation Sections: - Project Navigation: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07/standard-workflows/flight-support#left-sidebar - Main Content: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07/standard-workflows/flight-support#main ``` -------------------------------- ### GraphQL Schema Validation Example (TypeScript) Source: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07 An example demonstrating how to validate your code against Leon's staging GraphQL schema using TypeScript. This is recommended to ensure compatibility with new application versions. ```TypeScript // Example on how to validate code against Leon's GraphQL schema using TypeScript // Link to example: https://bitbucket.org/leondevteam/api-documentation/src/e455551e2ee06d1e1d50f4a80dce2c4e1e960a07/validation-example/TypeScript.md ``` -------------------------------- ### Bitbucket Pipelines Configuration Source: https://bitbucket.org/leondevteam/api-documentation/pipelines/results/1696/steps/%7B3bc7312e-812c-45ad-9c7e-f4b819f393c6%7D Configuration for Bitbucket CI/CD pipelines, including build steps and script execution. ```APIDOC bitbucket-pipelines.yml: pipelines: default: - step: name: Build setup script: - echo "Build setup" - step: name: Run changelog script script: - scripts/update-changelogs.sh - step: name: Build teardown script: - echo "Build teardown" ``` -------------------------------- ### Validation Example API Documentation Source: https://bitbucket.org/leondevteam/api-documentation/index Documentation for a validation example, specifically related to code validation against a GraphQL schema. This entry references a pull request and a commit dated April 3, 2024. ```APIDOC Module: validation-example Description: Merged in Describe-code-validation-against-GraphQL-schema (pull request #9). Last commit: 2024-04-03 (ac511a0fe1b1e8de2d46e37c787b10e3c3d10388) ``` -------------------------------- ### Install GraphQL Code Generator Source: https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425/validation-example/TypeScript This command installs the necessary packages for GraphQL Code Generator and its TypeScript plugins using npm. These tools are essential for generating TypeScript types from a GraphQL schema. ```bash npm install --save-dev @graphql-codegen/cli @graphql-codegen/typescript @graphql-codegen/typescript-operations ``` -------------------------------- ### Leon API FAQ Source: https://bitbucket.org/leondevteam/api-documentation/src/0828abbba843abb66d266914ea6358e839f8c36c Frequently Asked Questions regarding the Leon API, including data schema requests, understanding 'myOprId', and finding sample queries. ```APIDOC FAQ: - Missing Data: Contact support@leonsoftware.com to request additions to the API schema. - myOprId: The first segment of your operator's domain (e.g., 'demo' from 'demo.leon.aero'). - Sample Queries: Available in the sample queries directory: https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/ ``` -------------------------------- ### Accessing Sample Queries Source: https://bitbucket.org/leondevteam/api-documentation/src/master Sample queries for the Leon API can be found in the dedicated sample queries directory on Bitbucket. This resource helps developers understand how to effectively query the API. ```Markdown Please visit [sample queries directory](https://bitbucket.org/leondevteam/api-documentation/src/master/sample-queries/) ``` -------------------------------- ### Code Validation Example (TypeScript) Source: https://bitbucket.org/leondevteam/api-documentation/src/ff08102f49c0db6ee521946b317821e585703c05/README Example of how to validate your code against Leon's staging GraphQL schema using TypeScript. This helps prevent application failures due to breaking changes in new API versions. ```TypeScript import { buildSchema } from 'graphql'; // Fetch the schema from the staging URL fetch('http://api-schema-doc.s3-website-eu-west-1.amazonaws.com/schema-staging.json') .then(response => response.json()) .then(schemaJson => { const schema = buildSchema(schemaJson); // Your validation logic here console.log('Schema loaded successfully'); }); ``` -------------------------------- ### API Documentation Overview Source: https://bitbucket.org/leondevteam/api-documentation/src/19be8568e491a6bf9a91f5d87854922e0893df26/authentication/ApiKey Provides an overview and navigation links for the API documentation of the bitbucket-leondevteam project hosted on Bitbucket. ```APIDOC Project: /context7/bitbucket-leondevteam-api-documentation ## [API Documentation](https://bitbucket.org/leondevteam/api-documentation) Links: 1. [Project Navigation](https://bitbucket.org/leondevteam/api-documentation/src/19be8568e491a6bf9a91f5d87854922e0893df26/authentication/ApiKey.md#left-sidebar) 2. [Main](https://bitbucket.org/leondevteam/api-documentation/src/19be8568e491a6bf9a91f5d87854922e0893df26/authentication/ApiKey.md#main) ``` -------------------------------- ### GraphQL Schema Validation Example Source: https://bitbucket.org/leondevteam/api-documentation/src/f2ef61d11b734c3a34f3b98b6d22e155047f11f7/README An example demonstrating how to validate your code against Leon's staging GraphQL schema using TypeScript. This helps prevent issues caused by breaking changes in new application versions. ```APIDOC GraphQL Schema Validation: The staging GraphQL schema can be found at For an example on how to do it using TypeScript, click [here](https://bitbucket.org/leondevteam/api-documentation/src/f2ef61d11b734c3a34f3b98b6d22e155047f11f7/validation-example/TypeScript.md). ``` -------------------------------- ### Validating Code Against Leon's GraphQL Schema (TypeScript Example) Source: https://bitbucket.org/leondevteam/api-documentation/src/ef9a7f1fd84e2d560ff166b0e75e1252e9845b14 Instructions on how to validate application code against Leon's staging GraphQL schema to prevent failures due to breaking changes in new application versions. Includes a TypeScript example. ```APIDOC Checking your code validity against Leon's GraphQL schema: - Leon releases new application versions bi-weekly, which may include breaking changes. - It is recommended to automate code validation against the staging GraphQL schema. - Staging GraphQL schema URL: - Schema generation: Daily after 07:00 UTC. - Example for validation using TypeScript: [TypeScript.md](https://bitbucket.org/leondevteam/api-documentation/src/ef9a7f1fd84e2d560ff166b0e75e1252e9845b14/validation-example/TypeScript.md) ``` ```TypeScript // Example of how to validate code against GraphQL schema using TypeScript // (Actual implementation details would be in the linked .md file) // Assume 'graphql' library is installed and configured // import { buildSchema, validate } from 'graphql'; // async function validateSchema() { // const schemaUrl = 'http://api-schema-doc.s3-website-eu-west-1.amazonaws.com/schema-staging.json'; // const response = await fetch(schemaUrl); // const schemaString = await response.text(); // const leonSchema = buildSchema(schemaString); // // Your application's GraphQL query or mutation // const myQuery = ` // query GetMyData { // someField // } // `; // const validationErrors = validate(leonSchema, parse(myQuery)); // if (validationErrors.length > 0) { // console.error('Schema validation failed:', validationErrors); // } else { // console.log('Schema validation successful.'); // } // } // validateSchema(); ``` -------------------------------- ### Leon API Client Libraries and Tools Source: https://bitbucket.org/leondevteam/api-documentation/index Suggests various GraphQL client libraries and tools for interacting with the Leon API, highlighting Prisma Playground and Altair GraphQL Client as recommended options. ```APIDOC Client libs and tools: - Dozens of GraphQL client libraries are available for different programming languages (see [GraphQL Code](https://graphql.org/code/)). - Recommended tools: - [Prisma Playground](https://github.com/prisma/graphql-playground): IDE for GraphQL, convenient for connecting to the Leon API. - [Altair GraphQL Client](https://altairgraphql.dev/): Another recommended GraphQL client. ``` -------------------------------- ### TypeScript Code Validation Example Source: https://bitbucket.org/leondevteam/api-documentation/src/ef9a7f1fd84e2d560ff166b0e75e1252e9845b14/validation-example Demonstrates how to validate TypeScript code against a GraphQL schema. This snippet likely includes functions or classes for schema parsing and validation logic. It serves as a practical example for developers working with GraphQL and TypeScript. ```TypeScript import { buildSchema } from 'graphql'; const schema = buildSchema(` type Query { hello: String } `); function validateCode(code: string, schema: any): boolean { // Placeholder for actual validation logic console.log('Validating code against schema:', schema); // In a real scenario, you would parse the code and check against the schema return true; } const sampleCode = 'query { hello }'; const isValid = validateCode(sampleCode, schema); console.log(`Code is valid: ${isValid}`); ``` -------------------------------- ### GraphQL Query Example Source: https://bitbucket.org/leondevteam/api-documentation/src/d1bf0ec136d23cce925368a93dad093228700824 This example shows how to query the Leon API for aircraft type information using GraphQL. It includes the necessary authorization header with the access token and a sample query to retrieve aircraft types matching a wildcard. ```curl curl 'https://yourOprId.leon.aero/api/graphql/' -H 'Content-Type: application/json' -H 'Authorization: Bearer c137be70d5at716cc8e8c9es5nfe20fce102b13dfefac9e60ad25edd92734bd6f1e1f3269' --data-binary '{"query":"query {\n aircraftTypeList(wildcard: \"CL30\") {\n acftTypeId,\n iCAO\n }\n}"}' ``` ```json { "data": { "aircraftTypeList": [ { "acftTypeId": "CL30", "iCAO": "CL30" }, { "acftTypeId": "BDC30", "iCAO": "CL30" }, { "acftTypeId": "CL301", "iCAO": "CL30" } ] } } ``` -------------------------------- ### API Documentation Overview Source: https://bitbucket.org/leondevteam/api-documentation/src Provides an overview and navigation links for the API documentation hosted on Bitbucket. ```APIDOC Project: /context7/bitbucket-leondevteam-api-documentation ## [API Documentation](https://bitbucket.org/leondevteam/api-documentation) Skip to: 1. [Project Navigation](https://bitbucket.org/leondevteam/api-documentation/src#left-sidebar) 2. [Main](https://bitbucket.org/leondevteam/api-documentation/src#main) ``` -------------------------------- ### Leon GraphQL Schema Validation Example (TypeScript) Source: https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425 Provides guidance and an example for validating your code against Leon's staging GraphQL schema to prevent issues with new application version releases. The staging schema is updated daily. ```APIDOC Staging GraphQL Schema: http://api-schema-doc.s3-website-eu-west-1.amazonaws.com/schema-staging.json Schema Generation: Daily after 07:00 UTC. Validation Example (TypeScript): [https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425/validation-example/TypeScript.md](https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425/validation-example/TypeScript.md) ``` -------------------------------- ### Bitbucket Pipeline Configuration Source: https://bitbucket.org/leondevteam/api-documentation/pipelines/results/1694/steps/%7B94647a31-302b-475b-91f5-6ed6c9ef7cc7%7D Configuration for the Bitbucket pipeline, including build steps and script execution. This defines the CI/CD process for the project. ```shell image: atlassian/default-image:latest pipelines: branches: master: - step: name: GQL schema changelogs update script: - echo "Running GQL schema changelogs update" - scripts/update-changelogs.sh artifacts: - "**/*.md" ``` -------------------------------- ### Pipeline Configuration Example Source: https://bitbucket.org/leondevteam/api-documentation/pipelines/results/1695 This snippet shows a typical Bitbucket Pipelines configuration file. It defines steps for running schema changelogs, indicating a CI/CD process for API documentation. ```YAML pipelines: default: - step: name: gql-schema-changelogs script: - echo "Running schema changelogs..." ``` -------------------------------- ### GraphQL Schema Validation (TypeScript Example) Source: https://bitbucket.org/leondevteam/api-documentation/src/4dd720da6a7384a2bb789a957498aba6818b8425/README Instructions and an example for validating application code against Leon's staging GraphQL schema using TypeScript. This helps prevent issues caused by breaking changes in new API versions. ```TypeScript import { buildSchema } from 'graphql'; // Fetch the schema from the staging URL // const schemaUrl = 'http://api-schema-doc.s3-website-eu-west-1.amazonaws.com/schema-staging.json'; // fetch(schemaUrl).then(response => response.json()).then(schemaJson => { // const schema = buildSchema(schemaJson); // // Now you can use the schema object for validation // }); // Example of validating a query against a schema object // const myQuery = `{ // someField // }`; // const validationErrors = validate(schema, parse(myQuery)); // if (validationErrors.length > 0) { // console.error('Validation Errors:', validationErrors); // } else { // console.log('Query is valid!'); // } ```