Skip to content

Conversation

@oguzkocer
Copy link
Contributor

@oguzkocer oguzkocer commented Sep 11, 2024

Implements update /posts endpoint and its integration tests following established patterns. It provides 100% integration test coverage - as far as I am aware - for individual field updates. I believe /posts is one of the most important endpoints for us, and the extra coverage will provide helpful. I am even thinking about going back to create /posts endpoint and adding more tests for it.

I've changed the timezone of the test site, so that the date & date_gmt values would be different which should help us avoid related false positive tests.

The meta.footnotes return a JSON string that contains a JSON array. I've added a custom parser and serializer for this, so that we can work with strong types. It seems to be working well at the moment, but it's entirely possible that I am missing some conditions which hopefully will pop-up as we add more WordPress versions and test sites.

@oguzkocer oguzkocer added this to the 0.2 milestone Sep 11, 2024
@oguzkocer oguzkocer changed the title Implement update/posts endpoint and its integration tests Implement update /posts endpoint and its integration tests Sep 12, 2024
@oguzkocer oguzkocer changed the title Implement update /posts endpoint and its integration tests Implements update /posts endpoint and its integration tests Sep 12, 2024
@oguzkocer oguzkocer marked this pull request as ready for review September 12, 2024 18:35
@oguzkocer oguzkocer enabled auto-merge (squash) September 12, 2024 18:35
@jkmassel
Copy link
Contributor

Anything in meta should probably be left as a HashMap<String, String> – I don't think this library will have enough context to parse what's in there (unless it's generated as part of something in core?)

In that case, I wonder if a separate crate would be the way to go – it could contain a second-level set of parsers for common core-level data stored there?

@oguzkocer
Copy link
Contributor Author

We briefly discussed post.meta with @jkmassel on Slack and decided to tackle it as its own thing at a later time and it is now being tracked in #306.

@oguzkocer oguzkocer merged commit 61ae307 into trunk Sep 24, 2024
22 checks passed
@oguzkocer oguzkocer deleted the posts-update branch September 24, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants