### Setup Documentation with Git and Pages (Bash) Source: https://context7.com/freedomsage/arcadocs/llms.txt This snippet provides shell commands to verify GitHub Pages setup and deploy documentation. It assumes the presence of a setup script and uses Git for version control. Inputs are the script file and repository state; outputs are committed changes and deployment to GitHub Pages. Limitations include requiring executable permissions and a configured repository. ```bash # Reads: openapi/homologacion.wsdl # openapi/produccion.wsdl # Creates: openapi/homologacion.yaml # openapi/produccion.yaml # Step 4: Verify GitHub Pages configuration chmod +x check_pages_setup.sh ./check_pages_setup.sh # Step 5: Commit and deploy git add . git commit -m "Setup documentation with OpenAPI specs" git push origin main # GitHub Actions will automatically deploy to: # https://freedomsage.github.io/arcadocs/ ``` -------------------------------- ### Project installation and documentation generation script Source: https://context7.com/freedomsage/arcadocs/llms.txt Bash commands to install required Python packages, convert a PDF manual to Markdown, extract structured sections into documentation files, and generate OpenAPI specifications from WSDL files. Relies on the Python scripts `convert_pdf.py`, `extract_sections.py`, and `create_openapi.py`. ```bash # Install Python dependencies\npip3 install -r requirements.txt\n\n# Requirements file content:\n# docling>=1.0.0 # PDF to Markdown conversion\n# pyyaml>=6.0 # YAML processing for OpenAPI\n# lxml>=4.9.0 # XML/WSDL parsing\n\n# Step 1: Convert PDF to Markdown (if manual-arca-source.md doesn't exist)\npython3 convert_pdf.py\n# Input: manual-desarrollador-ARCA-COMPG-v4-0.pdf\n# Output: manual-arca-source.md\n\n# Step 2: Extract sections into organized documentation\npython3 extract_sections.py\n# Reads: manual-arca-source.md\n# Creates:\n# docs/introduction.md\n# docs/authentication/README.md\n# docs/errors/README.md\n# docs/cae/README.md\n# docs/caea/README.md\n# docs/parameters/README.md\n# docs/comprobantes/README.md\n# docs/utils/README.md\n\n# Step 3: Generate OpenAPI specifications from WSDL\npython3 create_openapi.py ``` -------------------------------- ### SOAP Request for FECAEARegInformativo Source: https://github.com/freedomsage/arcadocs/blob/main/docs/caea/README.md Example SOAP request to AFIP's FECAEARegInformativo service. Demonstrates how to structure a request with authentication, header information, and multiple invoice details including monetary values and tax information. ```XML PD… jd.. 23000000004 ``` ```XML 3 9800 1 1 80 30000000007 38 38 20110211 200.00 100.00 0 100.00 0 0 PES 1 1 21064126523746 ``` ```XML 1 80 30000000007 39 39 20110211 101.00 100.00 0 0.00 0 1 PES 1 1 21064126523746 ``` ```XML 1 80 30000000007 40 40 20110211 100.00 0.00 0 100.00 0 0 PES 1 1 21064126523746 ``` -------------------------------- ### POST /FECAESolicitar Source: https://github.com/freedomsage/arcadocs/blob/main/docs/cae/README.md Submits an electronic invoice request to AFIP. Handles multiple invoice items with detailed tax calculations and returns processing results. ```APIDOC ## POST /FECAESolicitar ### Description Submits electronic invoices to AFIP with detailed tax information. Supports multiple invoice items per request. ### Method POST ### Endpoint SOAP endpoint for FECAESolicitar operation ### Parameters #### Request Body - **Auth** (object) - Required - Authentication credentials - **Token** (string) - Required - Security token - **Sign** (string) - Required - Digital signature - **Cuit** (string) - Required - Tax ID - **FeCAEReq** (object) - Required - Invoice request details - **FeCabReq** (object) - Required - Header information - **CantReg** (integer) - Required - Number of invoices - **PtoVta** (integer) - Required - Sales point - **CbteTipo** (integer) - Required - Invoice type - **FeDetReq** (array) - Required - Invoice items - **FECAEDetRequest** (object) - Required - Invoice details - **Concepto** (integer) - Required - Product/Service type - **DocTipo** (integer) - Required - Document type - **DocNro** (string) - Required - Document number - **ImpTotal** (decimal) - Required - Total amount - **ImpIVA** (decimal) - Required - VAT amount - **Iva** (array) - Required - VAT breakdown ### Request Example ```xml PD94….. tYft0…..... 33693450239 2 15 1 1 80 20111111112 184.05 26.25 ``` ### Response #### Success Response (200) - **FeCabResp** (object) - Response header - **Resultado** (string) - Processing result (A=Approved, R=Rejected, P=Partial) - **Errors** (array) - Optional - Error details if rejected - **Err** (object) - Error information - **Code** (integer) - Error code - **Msg** (string) - Error message #### Response Example ```xml R 10002 No coincide la cantidad de registros informadas con la cantidad real enviada ``` ``` -------------------------------- ### POST /FECAESolicitar Source: https://github.com/freedomsage/arcadocs/blob/main/docs/cae/README.md Sends a SOAP request to AFIP's FECAESolicitar operation to obtain a CAE for a tax receipt. Includes authentication fields and detailed invoice data. ```APIDOC ## POST /FECAESolicitar\n\n### Description\nSends a SOAP request to AFIP's electronic invoice authorization service (FECAESolicitar) to obtain a CAE (electronic authorization code) for a tax receipt.\n\n### Method\nPOST\n\n### Endpoint\n/FECAESolicitar (SOAP)\n\n### Parameters\n#### Path Parameters\n- *(none)*\n\n#### Query Parameters\n- *(none)*\n\n#### Request Body\n- **Auth.Token** (string) - Required - Authentication token.\n- **Auth.Sign** (string) - Required - Authentication signature.\n- **Auth.Cuit** (string) - Required - Taxpayer identifier.\n- **FeCAEReq.FeCabReq.CantReg** (integer) - Required - Number of records.\n- **FeCAEReq.FeCabReq.PtoVta** (integer) - Required - Point of sale.\n- **FeCAEReq.FeCabReq.CbteTipo** (integer) - Required - Receipt type.\n- **FeCAEReq.FeDetReq.FECAEDetRequest** (object) - Required - Detailed receipt data, including Concepto, DocTipo, DocNro, ImpTotal, ImpTotConc, ImpNeto, ImpOpEx, ImpTrib, ImpIVA, MonId, MonCotiz, Tributos, Opcionales, etc.\n\n### Request Example\n```xml\n\n \n \n \n \n PD94…\n tYft0…\n 23000000004\n \n \n \n 1\n 2\n 49\n \n \n \n 1\n 91\n 11111111111\n 1\n 1\n 20130715\n 1500\n 1000\n 0\n 0\n 500\n 0\n PES\n 1\n \n \n \n \n \n \n\n```\n\n### Response\n#### Success Response (200)\n- **FeCabResp.Cuit** (string) - Taxpayer identifier.\n- **FeCabResp.PtoVta** (integer) - Point of sale.\n- **FeCabResp.CbteTipo** (integer) - Receipt type.\n- **FeCabResp.FchProceso** (string) - Process date/time.\n- **FeCabResp.CantReg** (integer) - Number of records.\n- **FeCabResp.Resultado** (string) - Result code (A = approved).\n- **FeDetResp.FECAEDetResponse.CAE** (string) - Electronic authorization code.\n- **FeDetResp.FECAEDetResponse.CAEFchVto** (string) - CAE expiration date.\n\n### Response Example\n```xml\n\n \n \n \n \n 23000000004\n 2\n 49\n 20130715130307\n 1\n A\n N\n \n \n \n 1\n 91\n 11111111111\n 1\n 1\n 20130715\n A\n 63288001286628\n 20130725\n \n \n \n \n \n\n``` ``` -------------------------------- ### SOAP Response for FECAEARegInformativo Source: https://github.com/freedomsage/arcadocs/blob/main/docs/caea/README.md Example SOAP response from AFIP's FECAEARegInformativo service. Shows approval status for multiple invoices with CAEA (Electronic Authorization Code) details. Includes both header and detail sections of the response. ```XML 23000000004 9800 1 20110308 3 A N ``` ```XML 1 80 30000000007 35 35 20110211 A 21064126523746 1 80 30000000007 36 36 20110211 A 21064126523746 1 80 30000000007 36 36 20110211 A 21064126523746 ``` -------------------------------- ### AFIP Electronic Invoice SOAP Request - XML Implementation Source: https://github.com/freedomsage/arcadocs/blob/main/docs/cae/README.md Complete SOAP envelope for requesting electronic invoice authorization from AFIP service FECAESolicitar. Includes authentication credentials (Token, Sign, CUIT), invoice header details (type, point of sale), and comprehensive tax calculations (IVA, tribute). ```XML PD94….. tYft0…..... 23000000004 1 2 49 1 91 11111111111 1 1 20130715 1500 1000 0 0 500 0 PES 1 1 1 2 1000 25 250 2 2 500 100 250 91 Atilio Raúl Butaraco 92 225 93 Av. Benito Blanco 50 piso 3 - Cuidad de Montevideo - Uruguay ``` -------------------------------- ### SOAP Request for FECAESolicitar Used Goods Invoice Source: https://github.com/freedomsage/arcadocs/blob/main/docs/cae/README.md This XML SOAP request solicits CAE for one invoice record of type 49 (Bienes Usados) for a service-oriented transaction. It includes authentication, header details, and VAT information. Requires AFIP credentials and applies to used goods sales among responsible taxpayers in Argentina. ```xml PD94….. tYft0…..... 23000000004 1 15 49  BIENES USADOS 2  Servicios 80  CUIT 20111111112 1 1 20130708 1605 1000 500 0 0 105 20130708 20130708 20130708 PES 1 1 5  21% 500 105 </ar:FeDetReq> </ar:FeCAEReq> </ar:FECAESolicitar> </soapenv:Body> </soapenv:Envelope> ``` -------------------------------- ### GitHub Pages Deployment Workflow using GitHub Actions Source: https://context7.com/freedomsage/arcadocs/llms.txt Automated GitHub Actions workflow to build and deploy documentation site to GitHub Pages. Configured to trigger on pushes to main branch or manual workflow dispatch. Uses Ubuntu runner environment with proper permissions for GitHub Pages deployment. Requires documentation files in ./docs directory. ```YAML name: Deploy to GitHub Pages on: push: branches: ["main"] workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: "pages" cancel-in-progress: false jobs: deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v5 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: './docs' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 ``` -------------------------------- ### Jekyll site configuration for GitHub Pages Source: https://context7.com/freedomsage/arcadocs/llms.txt YAML configuration file for a Jekyll site that sets the title, description, theme, includes OpenAPI specs and markdown files, excludes build artifacts, and defines markdown processing and permalink style. Used by GitHub Pages to render the documentation site. ```yaml # _config.yml\ntitle: ARCA AFIP - Facturación Electrónica API Documentation\ndescription: Official API documentation for ARCA AFIP Electronic Invoicing Web Services v4.0\ntheme: jekyll-theme-cayman\n\n# Include OpenAPI specs and markdown files\ninclude:\n - openapi\n - "*.md"\n - "**/README.md"\n\n# Exclude build files\nexclude:\n - Gemfile\n - Gemfile.lock\n - node_modules\n - vendor\n\n# Markdown processing\nmarkdown: kramdown\nkramdown:\n input: GFM\n hard_wrap: false\n\n# Permalinks\npermalink: pretty ``` -------------------------------- ### GitHub MCP Server Integration (Bash and JSON) Source: https://context7.com/freedomsage/arcadocs/llms.txt This snippet integrates a GitHub MCP server for repository management using Docker and JSON configuration. It requires a GitHub Personal Access Token and supports read-only or full access modes. Inputs are the token and environment variables; outputs are server instance management. Limitations include dependency on Docker and valid token credentials. ```bash # Set GitHub Personal Access Token export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_your_token_here" # Run in read-only mode (safe for exploration) docker run -i --rm \ -e GITHUB_PERSONAL_ACCESS_TOKEN \ ghcr.io/github/github-mcp-server --read-only # Run with full access (for automation) docker run -i --rm \ -e GITHUB_PERSONAL_ACCESS_TOKEN \ -e GITHUB_TOOLSETS="repos,issues,pull_requests,actions" \ ghcr.io/github/github-mcp-server # Alternative: Build from source # (if github-mcp-server binary is present) ./github-mcp-server stdio --read-only ``` ```json { "servers": { "github": { "command": "docker", "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } } } ``` -------------------------------- ### Embed ReDoc interactive documentation page Source: https://context7.com/freedomsage/arcadocs/llms.txt HTML page that loads ReDoc to render the OpenAPI specification and provides a dropdown to switch between testing and production environments. Uses inline JavaScript to dynamically load the correct YAML file based on selection. No external dependencies beyond the Redoc CDN script. ```html \n\n\n ARCA AFIP - Facturación Electrónica API Documentation\n \n \n \n\n\n
\n \n \n
\n\n
\n\n \n \n\n ``` -------------------------------- ### AFIP Electronic Invoice SOAP Response - XML Implementation Source: https://github.com/freedomsage/arcadocs/blob/main/docs/cae/README.md Complete SOAP response envelope from AFIP FECAESolicitar service showing invoice authorization result. Includes header response with process details and detailed response with generated CAE authorization code and expiry date. ```XML 23000000004 2 49 20130715130307 1 A N 1 91 11111111111 1 1 20130715 A 63288001286628 20130725 ``` -------------------------------- ### GitHub Pages configuration verification script Source: https://context7.com/freedomsage/arcadocs/llms.txt Bash script that checks for the GitHub CLI, validates the GitHub Pages settings for the repository, and reports the status of the latest Pages workflow. It provides manual instructions if the CLI is missing or Pages are not configured. ```bash #!/bin/bash\n\nREPO=\"Freedomsage/arcadocs\"\nPAGES_URL=\"https://freedomsage.github.io/arcadocs/\"\n\necho \"🔍 Checking GitHub Pages configuration...\"\n\n# Check if gh CLI is available\nif ! command -v gh &> /dev/null; then\n echo \"❌ GitHub CLI (gh) not installed\"\n echo \"📖 Manual setup required:\"\n echo \" 1. Go to: https://github.com/$REPO/settings/pages\"\n echo \" 2. Set Source to 'GitHub Actions'\"\n echo \" 3. Save and push changes\"\n exit 1\nfi\n\n# Check Pages status\necho \"📊 Checking repository settings...\"\npages_status=$(gh api repos/$REPO/pages 2>&1)\n\nif echo \"$pages_status\" | grep -q \"404\"; then\n echo \"⚠️ GitHub Pages not configured yet\"\n echo \"🔧 To enable:\"\n echo \" 1. Visit: https://github.com/$REPO/settings/pages\"\n echo \" 2. Under 'Source', select 'GitHub Actions'\"\n echo \" 3. Click 'Save'\"\nelif echo \"$pages_status\" | grep -q \"build_type\"; then\n echo \"✅ GitHub Pages is configured\"\n echo \"🌐 Your site: $PAGES_URL\"\nelse\n echo \"❌ Could not determine Pages status\"\nfi\n\n# Check workflow status\necho \"🔄 Checking workflow runs...\"\nworkflow_status=$(gh run list --workflow=pages.yml --limit=1 --json status,conclusion 2>&1)\n\nif echo \"$workflow_status\" | grep -q \"completed.*success\"; then\n echo \"✅ Latest deployment successful\"\n echo \"🎉 Documentation available at: $PAGES_URL\"\nelif echo \"$workflow_status\" | grep -q \"in_progress\"; then\n echo \"⏳ Deployment in progress...\"\nelse\n echo \"📝 No deployments yet. Push to trigger workflow.\"\nfi ``` -------------------------------- ### SOAP Response for FECAESolicitar with Errors Source: https://github.com/freedomsage/arcadocs/blob/main/docs/cae/README.md This XML SOAP response from AFIP indicates rejection of the CAE request due to errors in record counts and unregistered sales point. It includes a result header and error details. Outputs approval status and error codes; requires parsing to handle rejections in electronic invoicing workflows. ```xml 2 15 1  FACTURA A 20100902 R  A=APROBADO, R=RECHAZADO, P=PARCIAL N 10002 No coincide la cantidad de registros informadas con la cantidad real enviada < /Msg> 1005 El punto de venta no se encuentra empadronado ``` -------------------------------- ### Generate OpenAPI 3.0 Specification from WSDL using Python Source: https://context7.com/freedomsage/arcadocs/llms.txt Parse WSDL files and generate OpenAPI 3.0 specifications for testing and production environments. Requires XML parsing and YAML output capabilities. Takes WSDL file path, environment name, and base URL as inputs. Outputs structured OpenAPI YAML files with defined endpoints and schemas. ```Python #!/usr/bin/env python3 import xml.etree.ElementTree as ET import yaml def parse_wsdl_operations(wsdl_file): """Extract operation names from WSDL""" tree = ET.parse(wsdl_file) root = tree.getroot() namespaces = { 'wsdl': 'http://schemas.xmlsoap.org/wsdl/', 'soap': 'http://schemas.xmlsoap.org/wsdl/soap/', } operations = [] for port_type in root.findall('.//wsdl:portType', namespaces): for operation in port_type.findall('wsdl:operation', namespaces): op_name = operation.get('name') if op_name: operations.append(op_name) return operations def create_openapi_spec(wsdl_file, environment, base_url): """Generate OpenAPI 3.0 specification""" operations = parse_wsdl_operations(wsdl_file) spec = { 'openapi': '3.0.3', 'info': { 'title': f'ARCA AFIP - Facturación Electrónica Web Service ({environment})', 'version': '4.0.0', 'description': f'''# ARCA AFIP Electronic Invoicing API **Environment:** {environment} **Base URL:** {base_url} ## Authentication All methods require a Ticket de Acceso from WSAA: 1. Get digital certificate from Clave Fiscal 2. Associate with "Facturación Electrónica" service 3. Request Access Ticket with service="wsfe" 4. Ticket valid for 12 hours ''', 'contact': { 'name': 'ARCA Support', 'url': 'http://www.arca.gob.ar/ws/', 'email': 'wsfev1@arca.gov.ar' } }, 'servers': [{'url': base_url, 'description': f'{environment} environment'}], 'paths': {}, 'components': { 'schemas': { 'FEAuthRequest': { 'type': 'object', 'required': ['Token', 'Sign', 'Cuit'], 'properties': { 'Token': {'type': 'string', 'description': 'Token from WSAA'}, 'Sign': {'type': 'string', 'description': 'Signature from WSAA'}, 'Cuit': {'type': 'integer', 'format': 'int64', 'description': 'Taxpayer CUIT'} } } } } } # Add each operation as a POST endpoint for operation in operations: spec['paths'][f'/{operation}'] = { 'post': { 'summary': operation, 'operationId': operation.lower(), 'requestBody': { 'required': True, 'content': { 'application/xml': { 'schema': {'type': 'object'}, 'example': '...' } } }, 'responses': { '200': {'description': 'Successful response'}, '400': {'description': 'Bad request'}, '500': {'description': 'Internal server error'} } } } return spec # Generate specs for both environments homologacion_spec = create_openapi_spec( 'openapi/homologacion.wsdl', 'Homologación (Testing)', 'https://wswhomo.afip.gov.ar/wsfev1/service.asmx' ) produccion_spec = create_openapi_spec( 'openapi/produccion.wsdl', 'Producción (Production)', 'https://servicios1.afip.gov.ar/wsfev1/service.asmx' ) # Save as YAML with open('openapi/homologacion.yaml', 'w', encoding='utf-8') as f: yaml.dump(homologacion_spec, f, allow_unicode=True, sort_keys=False) with open('openapi/produccion.yaml', 'w', encoding='utf-8') as f: yaml.dump(produccion_spec, f, allow_unicode=True, sort_keys=False) print("✓ Created OpenAPI specifications") ```