swagger: "2.0" info: title: ${API_NAME} description: Skills Mapper API version: 1.0.0 host: ${DOMAIN} schemes: - "https" securityDefinitions: firebase: authorizationUrl: "" flow: "implicit" type: "oauth2" x-google-issuer: "https://securetoken.google.com/${PROJECT_ID}" x-google-jwks_uri: "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com" x-google-audiences: ${PROJECT_ID} paths: /api/skills/autocomplete: get: summary: Autocomplete skills operationId: skillsAutocomplete description: Returns a list of skill suggestions based on the provided prefix x-google-backend: address: ${SKILL_SERVICE_URL}/autocomplete parameters: - name: prefix in: query description: The prefix to match against skill names required: true type: string produces: - "application/json" responses: 200: description: A list of skill suggestions schema: type: array items: type: string 400: description: Invalid request parameter(s) 500: description: An unexpected error occurred /api/facts: get: summary: Get facts operationId: getFacts description: Get all facts for the authenticated user x-google-backend: address: ${FACT_SERVICE_URL} path_translation: APPEND_PATH_TO_ADDRESS jwt_audience: ${FACT_SERVICE_URL} security: - firebase: [ ] produces: - "application/hal+json" responses: 200: description: OK 401: description: Unauthorized access 403: description: Forbidden access 500: description: An unexpected error occurred post: summary: Create a new fact description: Creates a new for the current user with the provided skill and level operationId: createFact x-google-backend: address: ${FACT_SERVICE_URL} path_translation: APPEND_PATH_TO_ADDRESS jwt_audience: ${FACT_SERVICE_URL} security: - firebase: [ ] consumes: - "application/json" produces: - "application/hal+json" parameters: - in: "header" name: "Authorization" type: "string" description: "Bearer token" required: true - in: "body" name: "body" description: "The skill and level of the fact to create" required: true schema: type: "object" properties: skill: type: "string" description: "The skill for the fact" level: type: "string" description: "The level for the fact" responses: 201: description: The newly created fact schema: type: "object" properties: fact: type: "string" description: The created fact 400: description: Invalid request parameter(s) 401: description: Unauthorized access 403: description: Forbidden access 500: description: An unexpected error occurred /api/facts/{id}: get: summary: Get fact operationId: getFact description: Get single fact for the authenticated user x-google-backend: address: ${FACT_SERVICE_URL} path_translation: APPEND_PATH_TO_ADDRESS jwt_audience: ${FACT_SERVICE_URL} security: - firebase: [ ] produces: - "application/hal+json" parameters: - in: path name: id type: integer required: true description: ID of the fact to get responses: '200': description: OK delete: summary: Delete facts operationId: deleteFact description: Delete a fact for the authenticated user x-google-backend: address: ${FACT_SERVICE_URL} path_translation: APPEND_PATH_TO_ADDRESS jwt_audience: ${FACT_SERVICE_URL} security: - firebase: [ ] produces: - "application/hal+json" parameters: - in: path name: id type: integer required: true description: ID of the fact to delete responses: '204': description: No Content /api/profiles/me: get: summary: Get profile operationId: getProfile description: Get a profile for the authenticated user x-google-backend: address: ${PROFILE_SERVICE_URL} path_translation: APPEND_PATH_TO_ADDRESS jwt_audience: ${PROFILE_SERVICE_URL} security: - firebase: [ ] produces: - "application/json" responses: '200': description: 'Profile found and returned successfully' '401': description: 'Missing or invalid Authorization header' '404': description: 'Profile not found' '500': description: 'Error retrieving profile'