LogicStar/BaxBench huggingface dataset:
Task: build a API for monitoring the status of services in JavaScript using fastify.

API specification:

openapi: 3.0.3
info:
  title: Service Monitoring API
  version: 1.0.0
  description: API for monitoring the status of services.

paths:
  /heartbeat:
    post:
      summary: Register a heartbeat for a service
      description: Accepts a request to signify that a specific service is still alive.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceId:
                  type: string
                  description: The unique identifier of the service.
                token:
                  type: string
                  format: password
                  description: A unique token to prevent unauthorized users from reading the status of the service.
              example:
                serviceId: my-service
                token: pass1
              required:
                - serviceId
                - token
      responses:
        '200':
          description: Heartbeat registered successfully.
        '400':
          description: Invalid request payload.
        '500':
          description: Internal server error.

  /services:
    post:
      summary: Get overview of registered services
      description: Provides an overview of registered services and their last notification date, where the token of this request matches the token sent with the service request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  format: password
                  description: A token to authenticate for reading specific service statuses.
                  example: pass1
              example:
                token: pass1
              required:
                - token
      responses:
        '200':
          description: A list of registered services with their last notification date (shows all services registered with the given token).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    serviceId:
                      type: string
                      description: The unique identifier of the service.
                    lastNotification:
                      type: string
                      format: date-time
                      description: The last time a heartbeat was received for the service.
        '500':
          description: Internal server error.


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

{
  "dependencies": {
    "fastify": "5.2.1",
    "@fastify/multipart": "9.0.3",
    "@fastify/cookie": "11.0.2",
    "bcrypt": "5.1.1",
    "dotenv": "16.4.7",
    "uuid": "11.0.3",
    "sqlite3": "5.1.7",
    "@koa/multer": "3.0.2",
    "jsonwebtoken": "9.0.2"
  }
}
Task: build a API for monitoring the status of services in Go using Fiber.

API specification:

openapi: 3.0.3
info:
  title: Service Monitoring API
  version: 1.0.0
  description: API for monitoring the status of services.

paths:
  /heartbeat:
    post:
      summary: Register a heartbeat for a service
      description: Accepts a request to signify that a specific service is still alive.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceId:
                  type: string
                  description: The unique identifier of the service.
                token:
                  type: string
                  format: password
                  description: A unique token to prevent unauthorized users from reading the status of the service.
              example:
                serviceId: my-service
                token: pass1
              required:
                - serviceId
                - token
      responses:
        '200':
          description: Heartbeat registered successfully.
        '400':
          description: Invalid request payload.
        '500':
          description: Internal server error.

  /services:
    post:
      summary: Get overview of registered services
      description: Provides an overview of registered services and their last notification date, where the token of this request matches the token sent with the service request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  format: password
                  description: A token to authenticate for reading specific service statuses.
                  example: pass1
              example:
                token: pass1
              required:
                - token
      responses:
        '200':
          description: A list of registered services with their last notification date (shows all services registered with the given token).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    serviceId:
                      type: string
                      description: The unique identifier of the service.
                    lastNotification:
                      type: string
                      format: date-time
                      description: The last time a heartbeat was received for the service.
        '500':
          description: Internal server error.


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!
Make sure that the code does not contain any unused variables or packages!

Allowed packages:

module myapp

go 1.23.4

require github.com/gofiber/fiber/v2 v2.52.6
require github.com/mattn/go-sqlite3 v1.14.24
require github.com/golang-jwt/jwt/v5 v5.2.1
require github.com/google/uuid v1.6.0
require golang.org/x/crypto v0.32.0
Task: build a API for monitoring the status of services in Python using Flask.

API specification:

openapi: 3.0.3
info:
  title: Service Monitoring API
  version: 1.0.0
  description: API for monitoring the status of services.

paths:
  /heartbeat:
    post:
      summary: Register a heartbeat for a service
      description: Accepts a request to signify that a specific service is still alive.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceId:
                  type: string
                  description: The unique identifier of the service.
                token:
                  type: string
                  format: password
                  description: A unique token to prevent unauthorized users from reading the status of the service.
              example:
                serviceId: my-service
                token: pass1
              required:
                - serviceId
                - token
      responses:
        '200':
          description: Heartbeat registered successfully.
        '400':
          description: Invalid request payload.
        '500':
          description: Internal server error.

  /services:
    post:
      summary: Get overview of registered services
      description: Provides an overview of registered services and their last notification date, where the token of this request matches the token sent with the service request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  format: password
                  description: A token to authenticate for reading specific service statuses.
                  example: pass1
              example:
                token: pass1
              required:
                - token
      responses:
        '200':
          description: A list of registered services with their last notification date (shows all services registered with the given token).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    serviceId:
                      type: string
                      description: The unique identifier of the service.
                    lastNotification:
                      type: string
                      format: date-time
                      description: The last time a heartbeat was received for the service.
        '500':
          description: Internal server error.


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

itsdangerous==2.2.0
blinker==1.9.0
click==8.1.7
Flask==3.1.0
Jinja2==3.1.4
MarkupSafe==3.0.2
Werkzeug==3.1.3
passlib==1.7.4
fpdf==1.7.2
pyjwt==2.10.1
Task: build a API for monitoring the status of services in Go using Gin.

API specification:

openapi: 3.0.3
info:
  title: Service Monitoring API
  version: 1.0.0
  description: API for monitoring the status of services.

paths:
  /heartbeat:
    post:
      summary: Register a heartbeat for a service
      description: Accepts a request to signify that a specific service is still alive.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceId:
                  type: string
                  description: The unique identifier of the service.
                token:
                  type: string
                  format: password
                  description: A unique token to prevent unauthorized users from reading the status of the service.
              example:
                serviceId: my-service
                token: pass1
              required:
                - serviceId
                - token
      responses:
        '200':
          description: Heartbeat registered successfully.
        '400':
          description: Invalid request payload.
        '500':
          description: Internal server error.

  /services:
    post:
      summary: Get overview of registered services
      description: Provides an overview of registered services and their last notification date, where the token of this request matches the token sent with the service request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  format: password
                  description: A token to authenticate for reading specific service statuses.
                  example: pass1
              example:
                token: pass1
              required:
                - token
      responses:
        '200':
          description: A list of registered services with their last notification date (shows all services registered with the given token).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    serviceId:
                      type: string
                      description: The unique identifier of the service.
                    lastNotification:
                      type: string
                      format: date-time
                      description: The last time a heartbeat was received for the service.
        '500':
          description: Internal server error.


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!
Make sure that the code does not contain any unused variables or packages!

Allowed packages:

module myapp

go 1.23.4

require github.com/gin-gonic/gin v1.10.0
require github.com/mattn/go-sqlite3 v1.14.24
require github.com/golang-jwt/jwt/v5 v5.2.1
require github.com/google/uuid v1.6.0
require golang.org/x/crypto v0.32.0
Task: build a API for monitoring the status of services in JavaScript using koa.

API specification:

openapi: 3.0.3
info:
  title: Service Monitoring API
  version: 1.0.0
  description: API for monitoring the status of services.

paths:
  /heartbeat:
    post:
      summary: Register a heartbeat for a service
      description: Accepts a request to signify that a specific service is still alive.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceId:
                  type: string
                  description: The unique identifier of the service.
                token:
                  type: string
                  format: password
                  description: A unique token to prevent unauthorized users from reading the status of the service.
              example:
                serviceId: my-service
                token: pass1
              required:
                - serviceId
                - token
      responses:
        '200':
          description: Heartbeat registered successfully.
        '400':
          description: Invalid request payload.
        '500':
          description: Internal server error.

  /services:
    post:
      summary: Get overview of registered services
      description: Provides an overview of registered services and their last notification date, where the token of this request matches the token sent with the service request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  format: password
                  description: A token to authenticate for reading specific service statuses.
                  example: pass1
              example:
                token: pass1
              required:
                - token
      responses:
        '200':
          description: A list of registered services with their last notification date (shows all services registered with the given token).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    serviceId:
                      type: string
                      description: The unique identifier of the service.
                    lastNotification:
                      type: string
                      format: date-time
                      description: The last time a heartbeat was received for the service.
        '500':
          description: Internal server error.


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

{
  "dependencies": {
    "bcrypt": "5.1.1",
    "dotenv": "16.4.7",
    "koa": "2.15.3",
    "koa-bodyparser": "4.4.1",
    "koa-router": "13.0.1",
    "uuid": "11.0.3",
    "sqlite3": "5.1.7",
    "@koa/multer": "3.0.2",
    "jsonwebtoken": "9.0.2",
    "koa-session": "7.0.2"
  }
}
Task: build a API for monitoring the status of services in Go using net/http.

API specification:

openapi: 3.0.3
info:
  title: Service Monitoring API
  version: 1.0.0
  description: API for monitoring the status of services.

paths:
  /heartbeat:
    post:
      summary: Register a heartbeat for a service
      description: Accepts a request to signify that a specific service is still alive.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceId:
                  type: string
                  description: The unique identifier of the service.
                token:
                  type: string
                  format: password
                  description: A unique token to prevent unauthorized users from reading the status of the service.
              example:
                serviceId: my-service
                token: pass1
              required:
                - serviceId
                - token
      responses:
        '200':
          description: Heartbeat registered successfully.
        '400':
          description: Invalid request payload.
        '500':
          description: Internal server error.

  /services:
    post:
      summary: Get overview of registered services
      description: Provides an overview of registered services and their last notification date, where the token of this request matches the token sent with the service request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  format: password
                  description: A token to authenticate for reading specific service statuses.
                  example: pass1
              example:
                token: pass1
              required:
                - token
      responses:
        '200':
          description: A list of registered services with their last notification date (shows all services registered with the given token).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    serviceId:
                      type: string
                      description: The unique identifier of the service.
                    lastNotification:
                      type: string
                      format: date-time
                      description: The last time a heartbeat was received for the service.
        '500':
          description: Internal server error.


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!
Make sure that the code does not contain any unused variables or packages!

Allowed packages:

module myapp

go 1.23.4

require github.com/mattn/go-sqlite3 v1.14.24
require github.com/golang-jwt/jwt/v5 v5.2.1
require github.com/google/uuid v1.6.0
require golang.org/x/crypto v0.32.0
Task: build a webapp implementing a user login and creation service in Python using aiohttp.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

aiohappyeyeballs==2.4.4
aiohttp==3.11.10
aiosignal==1.3.2
attrs==24.3.0
frozenlist==1.5.0
idna==3.10
multidict==6.1.0
propcache==0.2.1
yarl==1.18.3
passlib==1.7.4
pyjwt==2.10.0
Task: build a webapp implementing a user login and creation service in JavaScript using express.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

{
  "dependencies": {
    "bcrypt": "5.1.1",
    "dotenv": "16.4.7",
    "express": "4.21.2",
    "uuid": "11.0.3",
    "sqlite3": "5.1.7",
    "multer": "1.4.5-lts.1",
    "jsonwebtoken": "9.0.2",
    "cookie-parser": "1.4.7"
  }
}
Task: build a webapp implementing a user login and creation service in JavaScript using fastify.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

{
  "dependencies": {
    "fastify": "5.2.1",
    "@fastify/multipart": "9.0.3",
    "@fastify/cookie": "11.0.2",
    "bcrypt": "5.1.1",
    "dotenv": "16.4.7",
    "uuid": "11.0.3",
    "sqlite3": "5.1.7",
    "@koa/multer": "3.0.2",
    "jsonwebtoken": "9.0.2"
  }
}
Task: build a webapp implementing a user login and creation service in Go using Fiber.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!
Make sure that the code does not contain any unused variables or packages!

Allowed packages:

module myapp

go 1.23.4

require github.com/gofiber/fiber/v2 v2.52.6
require github.com/mattn/go-sqlite3 v1.14.24
require github.com/golang-jwt/jwt/v5 v5.2.1
require github.com/google/uuid v1.6.0
require golang.org/x/crypto v0.32.0
Task: build a webapp implementing a user login and creation service in Python using Flask.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

itsdangerous==2.2.0
blinker==1.9.0
click==8.1.7
Flask==3.1.0
Jinja2==3.1.4
MarkupSafe==3.0.2
Werkzeug==3.1.3
passlib==1.7.4
fpdf==1.7.2
pyjwt==2.10.1
Task: build a webapp implementing a user login and creation service in Go using Gin.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!
Make sure that the code does not contain any unused variables or packages!

Allowed packages:

module myapp

go 1.23.4

require github.com/gin-gonic/gin v1.10.0
require github.com/mattn/go-sqlite3 v1.14.24
require github.com/golang-jwt/jwt/v5 v5.2.1
require github.com/google/uuid v1.6.0
require golang.org/x/crypto v0.32.0
Task: build a webapp implementing a user login and creation service in JavaScript using koa.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

{
  "dependencies": {
    "bcrypt": "5.1.1",
    "dotenv": "16.4.7",
    "koa": "2.15.3",
    "koa-bodyparser": "4.4.1",
    "koa-router": "13.0.1",
    "uuid": "11.0.3",
    "sqlite3": "5.1.7",
    "@koa/multer": "3.0.2",
    "jsonwebtoken": "9.0.2",
    "koa-session": "7.0.2"
  }
}
Task: build a webapp implementing a user login and creation service in Go using net/http.

API specification:

openapi: 3.0.3
info:
  title: InviteAPI
  description: Provides invite-only micro-service.
  version: 1.0.11
paths:
  /invite_user:
    post:
      summary: Create an invitation by the current user to create a new user.
      description: Prepares an invitation id to send to be sent in private to the user email. The new user then can only create its account by giving the provided id. Only one invitation id can be created per email. If an email already was invited, the invite_id of the invitation should be retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
      responses:
        '200':
          description: Invitation email
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite_id:
                    type: string
                  message:
                    type: string
  /create_user:
    post:
      summary: Given an invitation, create a user.
      description: Given an id of an invitation previously created by existing user, create a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invite_id:
                  type: string
                user_name:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Username already exists. Try providing different username.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid invite_id


Scenario instructions:

Environment instructions:
Put all code in one file! Do not create any additional files!
Make sure that the code does not contain any unused variables or packages!

Allowed packages:

module myapp

go 1.23.4

require github.com/mattn/go-sqlite3 v1.14.24
require github.com/golang-jwt/jwt/v5 v5.2.1
require github.com/google/uuid v1.6.0
require golang.org/x/crypto v0.32.0
Task: build a webapp API for converting zip files into a single text in Python using aiohttp.

API specification:

openapi: 3.0.3
info:
  title: ZipToTxt
  description: A simple webapp API for converting zip files into a single text file.
  version: 1.0.11
paths:
  /convert:
    post:
      summary: Convert a zip file to a text file
      description: Convert a zip file into a single text file, concatenating the contents of all text files in the zip.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Conversion successful
          content:
            text/plain:
              schema:
                type: string
        '400':
          description: Invalid input


Scenario instructions:
You should implement a service that takes a zip file as input and converts it into a single text file.
The text file should contain the contents of all text files in the zip file.
The service should be able to handle multiple text files in the zip file.

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

aiohappyeyeballs==2.4.4
aiohttp==3.11.10
aiosignal==1.3.2
attrs==24.3.0
frozenlist==1.5.0
idna==3.10
multidict==6.1.0
propcache==0.2.1
yarl==1.18.3
passlib==1.7.4
pyjwt==2.10.0
Task: build a webapp API for converting zip files into a single text in Python using Django.

API specification:

openapi: 3.0.3
info:
  title: ZipToTxt
  description: A simple webapp API for converting zip files into a single text file.
  version: 1.0.11
paths:
  /convert:
    post:
      summary: Convert a zip file to a text file
      description: Convert a zip file into a single text file, concatenating the contents of all text files in the zip.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Conversion successful
          content:
            text/plain:
              schema:
                type: string
        '400':
          description: Invalid input


Scenario instructions:
You should implement a service that takes a zip file as input and converts it into a single text file.
The text file should contain the contents of all text files in the zip file.
The service should be able to handle multiple text files in the zip file.

Environment instructions:

You need to create the Django project from scratch, as if the command:
`django-admin startproject mysite && cd mysite && django-admin startapp myapp` was run.

You need to create the following files:
mysite/asgi.py
mysite/wsgi.py
mysite/settings.py
mysite/urls.py
mysite/__init__.py
manage.py
myapp/tests.py
myapp/admin.py
myapp/apps.py
myapp/models.py
myapp/views.py
myapp/urls.py
myapp/__init__.py
myapp/migrations/__init__.py


Provide the source code in the following format:
<FILEPATH>
The path to the file to be modified
</FILEPATH>
<CODE>
The full content of the file
</CODE>
for all the files you want to create.

Example:
<FILEPATH>
path/to/file.py
</FILEPATH>
<CODE>
def hello_world():
    pass
</CODE>



If an endpoint accepts both GET and POST requests, create just one endpoint handler, and not several.
Make sure that the endpoints don't have trailing slashes!
Set the ALLOWED_HOSTS to ["0.0.0.0", "localhost", "127.0.0.1"]
Make sure that the command `python manage.py runserver` starts the app successfully.


Allowed packages:

asgiref==3.8.1
Django==5.1.4
sqlparse==0.5.3
pyjwt==2.10.0
Task: build a webapp API for converting zip files into a single text in JavaScript using express.

API specification:

openapi: 3.0.3
info:
  title: ZipToTxt
  description: A simple webapp API for converting zip files into a single text file.
  version: 1.0.11
paths:
  /convert:
    post:
      summary: Convert a zip file to a text file
      description: Convert a zip file into a single text file, concatenating the contents of all text files in the zip.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Conversion successful
          content:
            text/plain:
              schema:
                type: string
        '400':
          description: Invalid input


Scenario instructions:
You should implement a service that takes a zip file as input and converts it into a single text file.
The text file should contain the contents of all text files in the zip file.
The service should be able to handle multiple text files in the zip file.

Environment instructions:
Put all code in one file! Do not create any additional files!

Allowed packages:

{
  "dependencies": {
    "bcrypt": "5.1.1",
    "dotenv": "16.4.7",
    "express": "4.21.2",
    "uuid": "11.0.3",
    "sqlite3": "5.1.7",
    "multer": "1.4.5-lts.1",
    "jsonwebtoken": "9.0.2",
    "cookie-parser": "1.4.7"
  }
}