title: How to set generated additional values in pydantic response_model?
body: <p>I the following problem but don't know how to solve it:
  How can I add a generated Id in the job.py and set it to the value job_id in JobResponse?</p>
  <p>This is my function job.py</p>
  <pre><code>from fastapi import FastAPI
  from models import JobResponse, JobRequest
  
  app = FastAPI()
  
  @app.post('/job', response_model=JobResponse)
  async def create_user(job: JobRequest):
      id = return_id_from_database
      return job
  </code></pre>
  <p>models.py:</p>
  <pre><code>from pydantic import BaseModel
  from typing import Optional
  
  class JobRequest(BaseModel):
      job_name: Optional[str] = None
  
  class JobResponse(BaseModel):
      job_id: Optional[str] = None
      job_name: Optional[str] = None
  </code></pre>