Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

238 Open API: Document an endpoint to return a single capital project #282

Conversation

dhochbaum-dcp
Copy link
Contributor

Fixed the issue in the CapitalProjectBudgeted schema, and added the /capital-projects/{managingCode}/{capitalProjectid} endpoint.

Completes #238

TangoYankee
TangoYankee previously approved these changes May 20, 2024
@TangoYankee TangoYankee dismissed their stale review May 20, 2024 21:23

The changes are good. But, I want to hold off merging so that other endpoints can be implemented before this one.

Copy link
Member

@TangoYankee TangoYankee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYSA: Rebasing to main will delete the openapi/index.html and then ignore any regeneration of it. This will prevent future conflicts from that file. This should make life a little easier. Conflicts will still happen with the yaml file- so it goes.

openapi/openapi.yaml Outdated Show resolved Hide resolved
Copy link
Member

@TangoYankee TangoYankee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve conflicts & consolidate to one commit and I'll approve

@dhochbaum-dcp
Copy link
Contributor Author

resolve conflicts & consolidate to one commit and I'll approve

Resolved conflicts, will squash when merging.

@TangoYankee
Copy link
Member

TangoYankee commented Jun 4, 2024

resolve conflicts & consolidate to one commit and I'll approve

Resolved conflicts, will squash when merging.

Squashing is disabled. Only rebasing is enabled

@dhochbaum-dcp
Copy link
Contributor Author

resolve conflicts & consolidate to one commit and I'll approve

Resolved conflicts, will squash when merging.

Squashing is disabled. Only rebasing is enabled

I'm encountering issues attempting to squash locally. Do you have a good set of instructions?

openapi/openapi.yaml Outdated Show resolved Hide resolved
@TangoYankee
Copy link
Member

resolve conflicts & consolidate to one commit and I'll approve

Resolved conflicts, will squash when merging.

Squashing is disabled. Only rebasing is enabled

I'm encountering issues attempting to squash locally. Do you have a good set of instructions?

Standby

@TangoYankee
Copy link
Member

resolve conflicts & consolidate to one commit and I'll approve

Resolved conflicts, will squash when merging.

Squashing is disabled. Only rebasing is enabled

I'm encountering issues attempting to squash locally. Do you have a good set of instructions?

Standby

The heart of what we're doing is rewriting the history of the feature branch to make it more succinct. That way, when we place it in the shared history of main (which we never rewrite), we have an easy to read log of changes. A better overview for squash v rebase than I could give

With that in mind, the first thing we'll do is a soft reset back to the last commit that came from main:

git reset  d6d9acc5ec5c110a72903c4a52a61894f023cdcb --soft

This gives us all of the relevant code changes while removing the commits from the history.

While we're here, I noticed that Id should be capitalized. So let's make that change in the source code before we commit.

/capital-projects/{managingCode}/{capitalProjectId}:

It also seems the non-200 endpoints seem to have gone missing from the /boroughs/{boroughId}/community-districts/{communityDistrictId}/capital-projects: just above the capital project endpoint. (I think git saw the duplicate code and calculated that they were literally the same lines, rather than the same code repeated in different places.) Anyway, Let's copy those back in:

  /boroughs/{boroughId}/community-districts/{communityDistrictId}/capital-projects:
    get:
      summary: 🚧 Find paginated capital projects within a specified community district
      operationId: findCapitalProjectsByBoroughIdCommunityDistrictId
      tags:
      - Capital Projects
      parameters:
        - $ref: "#/components/parameters/boroughIdParam"
        - $ref: "#/components/parameters/communityDistrictIdParam"
      responses:
        '200':
          description: An object containing pagination metadata and an array of capital projects for the community district
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CapitalProjectPage"
        '400':
          $ref: "#/components/responses/BadRequest"
        '404':
          $ref: "#/components/responses/NotFound"
        '500':
          $ref: "#/components/responses/InternalServerError"

We'll stage these changes to the code

git add openapi/openapi.yaml

Then commit

git commit -m "your message here"

Then rebase onto main

git rebase --onto origin main

Finally, force push your feature branch

git push origin 238/Open-API-Document-an-endpoint-to-return-a-single-capital-project --force-with-lease

@dhochbaum-dcp dhochbaum-dcp force-pushed the 238/Open-API-Document-an-endpoint-to-return-a-single-capital-project branch from eef8bb2 to 3a52ef2 Compare June 4, 2024 17:01
@dhochbaum-dcp
Copy link
Contributor Author

Thanks, @TangoYankee.

@pratishta pratishta force-pushed the 238/Open-API-Document-an-endpoint-to-return-a-single-capital-project branch from 3a52ef2 to ed1d6da Compare June 12, 2024 20:05
@TangoYankee TangoYankee force-pushed the 238/Open-API-Document-an-endpoint-to-return-a-single-capital-project branch 2 times, most recently from 497c370 to e2a5a67 Compare June 12, 2024 20:29
Add the /capital-projects/{managingCode}/{capitalProjectid} endpoint.

closes #238
@TangoYankee TangoYankee force-pushed the 238/Open-API-Document-an-endpoint-to-return-a-single-capital-project branch from e2a5a67 to 23b1f93 Compare June 12, 2024 20:30
Copy link
Contributor

@pratishta pratishta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀 🚀 🚀 🚀 🚀 🚀

@TangoYankee TangoYankee merged commit 95160cb into main Jun 12, 2024
3 checks passed
@TangoYankee TangoYankee deleted the 238/Open-API-Document-an-endpoint-to-return-a-single-capital-project branch June 12, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants